After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 481823 - When opening multiple files, Nautilus starts one instance of the application per file
When opening multiple files, Nautilus starts one instance of the application ...
Status: RESOLVED DUPLICATE of bug 105653
Product: nautilus
Classification: Core
Component: File and Folder Operations
2.20.x
Other All
: Normal minor
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-09-30 09:47 UTC by F. Ingelrest
Modified: 2013-04-24 21:01 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20



Description F. Ingelrest 2007-09-30 09:47:57 UTC
Hi,

I'm trying to add command line support to one of my applications. What I would actually like would be to be able to open some files from Nautilus with my application. The problem is that the latter starts one instance of my application per selected file.

I could actually use, e.g., DBus to detect that my application is already running and pass to it the file received on the command line. However, my application is an audio player, and when opening multiple files, the user typically wants them to be played immediately, and these files should be sorted according to the current sorting criteria.

For instance, if I open a directory that contains all the tracks from a given album and if then I select all these files to open them, I expect my application to immediately start playing them *in the right order*, i.e., sorted by track number. How can I do that with the current behavior of Nautilus? I mean, I don't see how to be sure that the first instance will get the first track, so that other instances can simply pass to this one the other files and then stop.

IMHO, Nautilus should start only one instance and pass to it all the selected file, don't you think? It should be up to the application to decide how to handle multiple files, not up to Nautilus, because the expected behavior highly depends on the kind of application considered.

Other information:
Comment 1 Marcus Carlson 2009-09-26 22:28:34 UTC
I'd say it's up to your application to use some sort of message bus (eg DBus) to connect to an already running instance and do the right thing. For example if I open 5 files first and then 5 more, nautilus has to start a new instance anyway.
Comment 2 William Jon McCann 2012-09-05 13:22:14 UTC
*** Bug 633338 has been marked as a duplicate of this bug. ***
Comment 3 William Jon McCann 2012-09-05 13:24:31 UTC
*** Bug 550909 has been marked as a duplicate of this bug. ***
Comment 4 William Jon McCann 2012-09-05 13:24:42 UTC
*** Bug 551682 has been marked as a duplicate of this bug. ***
Comment 5 António Fernandes 2013-04-24 21:01:40 UTC
What I understand of comment 0 is that this is actually about opening a selection of files of the same type in a single call, so that, in this case, a media player plays the selection as a playlist.

This was dealt with in bug 105653. I tested it with a couple of videos and it works as expeted for both Totem and VLC: a single application instance is launched, selection becomes playlist.

*** This bug has been marked as a duplicate of bug 105653 ***