GNOME Bugzilla – Bug 675563
Open Nautilus to select folder
Last modified: 2013-01-02 17:33:46 UTC
It is good to see that Nautilus now supports selecting files (#632427) but what about folders? As a comparison OSX has 'open -R [path]' to reveal in Finder and Windows has the 'explorer /select,[path]' option which both take file or folder paths and highlight them upon opening.
How is that different from what we do now?
I was going to elaborate on this before but was short of time. The following will now open Nautilus with the specified file highlighted: nautilus /home/user/Desktop/file.pdf However doing the same with a specified directory will open that directory: nautilus /home/user/Desktop/ So with the above you will be actually in the Desktop directory but what I am suggesting is for an option (using -R only as example) such as: nautilus -R /home/user/Desktop/ this will then open /home/user/ and highlight the Desktop directory.
Thanks for the explanation. What would you use this for?
This originated from working on Deluge torrent client where we have an option to 'Open Containing Folder' that will open the directory that is holding the torrent data and we have had users asking that the files/directories be selected to make them easier to locate: http://dev.deluge-torrent.org/ticket/2098 The main use-case scenario I can imagine is asking an application to select a directory, like above, and then being able to perform an action such as compress, copy, move, or view properties. I also felt it would just be helpful to keep the same functionality cross-platform. The only hurdle from our p.o.v. is that to implement it in our application we have to wait for xdg to support such an option: https://bugs.freedesktop.org/show_bug.cgi?id=49552
I now pushed a patch for this to git master, implementing the --select option as requested.