GNOME Bugzilla – Bug 339565
Highlight File in Folder From Command Line URI
Last modified: 2010-05-27 23:42:04 UTC
Over at beagle we love URI's we have lots of them. We have them for almost every file in your home directory. The problem is, when we have the 'Reveal in Folder' option, we would really like to highlight that file. Take the following URI file:///home/kevin/nautilus_rocks.c If passed to nautilus, it will attempt to open that file. While this can be useful, what we would really like is some way to higlight that file. Since some users may have directories with hundreds of files in them, just showing them the directory does us little good, unless we can automaticaly have that file be front and center.
Amusingly, I was the one who was assigned the beagle bug and now I'm working on a totally different app and want the same behavior. Is there any progress on working on this?
Well, it sounds like a good idea, but nobody is working on it right now.
Any thoughts/pointers on where to look in the code for implementation/how difficult it would be to implement? In a perfect world we could get this (or some mechanism for it) in time for the next release of gnome?
Well, first of all you need a new command line parameter of course, for instance --reveal which would cause Nautilus to reveal the files specified as URIs. Then, you need to find a smart way to do the following for each passed-in URI that should be revealed: nautilus_window_go_to_with_selection (foo_window, reveal_parent_uri, list_containing_reveal_uri); Maybe NautilusShell needs a Nautilus_Shell_open_windows_with_selection interface and you have to figure out the parent URI using reveal_uri_file = nautilus_file_get (reveal_uri); followed by reveal_uri_parent_file = nautilus_file_get_parent (reveal_uri_file); Possibly in nautilus_application_startup. I'm not sure how much Alex likes the idea of having NautilusFile code in nautilus-application.c, but we already do something similar in find_parent_spatial_window. Maybe we also need some special error dialog for failure when nautilus_file_get_parent returns NULL. I'm also unsure how to handle nautilus_file_get NULL retvals.
Ubuntu bug about that: https://launchpad.net/products/nautilus/+bug/57537 "... problem: running "nautilus --no-desktop /etc/passwd" tells me "the location is not a folder". i know this. what i want is for nautilus to show me "/etc/" with the file "passwd" selected. prior art: Windows' Explorer offers this with "explorer /select,c:\etc\passwd.txt" and Mac OS also offers it via AppleEvents (i.e. osascript(1) on the command line). motivation: Firefox (and other browsers) on Mac OS and Windows are able to take me from their Downloads window directly to the file in question in the system's native file browser. Firefox on GNOME can't do this, and just takes me to the directory and leaves me to search manually. my terminal emulator (http://software.jessies.org/terminator/) we log every terminal the user creates. the info dialog lets you see the filename, but on Mac OS and Windows it also has a handy button that takes you to the file in question so you can delete it, copy it, open it in a text editor, mail it to someone. we're unable to implement this on GNOME, which makes the GNOME user experience much worse than the other platforms. ..."
Any thoughts on this possibly progressing or getting milestoned for 2.18?
This bug depends on bug 131259.
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find. *** This bug has been marked as a duplicate of bug 131259 ***