Issue metadata
Sign in to add a comment
|
Support org.freedesktop.FileManager1 interface in platform_util ShowItem
Reported by
bajk...@googlemail.com,
Apr 20 2017
|
||||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36 Steps to reproduce the problem: 1. Download a file on Linux 2. Wait for it to finish 3. Go to "Downloads" page 4. Click "Show in Folder" link on the download What is the expected behavior? The file manager opens the location the file was downloaded to (defaults to Downloads folder) and scrolls to and highlights the given file. What went wrong? The file manager just opens the folder and the user has to manually search the file in there. Did this work before? N/A Chrome version: 57.0.2987.133 Channel: stable OS Version: Flash Version: There is a org.freedesktop.FileManager1 DBus interface [1] that can be used to achieve the given effect for any file manager that supports it. It is currently supported KDE's Dolphin and Gnome Nautilus also. Example call: dbus-send --print-reply --dest=org.freedesktop.FileManager1 /org/freedesktop/FileManager1 org.freedesktop.FileManager1.ShowItems array:string:"file:///home" string:test This will open the file manager in "/" and highlight the "home" folder inside of that. If the call fails, it should then fallback to the old method of just opening the parent folder. This will implement the comment in the code: // TODO(estade): It would be nice to be able to select the file in other // file managers, but that probably requires extending xdg-open. // For now just show the folder for non-Nautilus users. [1] https://www.freedesktop.org/wiki/Specifications/file-manager-interface/
,
Apr 21 2017
Thanks for taking the time to do a screencast! Ubuntu uses Nautilus as a file manager for which Chrome has a dedicated "workaround" which explains why it works here. If you use any file manager other than Nautilus (such as KDE's Dolphin) on Linux as your default, the bug I described, occurs. The codeflow is approximatey like this (in [chromium]/src/chrome/browser/platform_util_linux.cc): - ShowItemInFolder - CheckNautilusIsDefault: Checks xdg-mime for who is the handler of inode/directory mime type and the Nautilus version used - ShowItem, when use_nautilus_file_browser is set, ends up doing ShowFileInNautilus which explicitly runs Nautilus with given file - In all other cases (ie. other file manager is the default) it just opens the parent folder. Also see the discussion in the patch that added this special case for Nautilus: https://codereview.chromium.org/1867533002/
,
Apr 21 2017
Thank you for providing more feedback. Adding requester "jmukthavaram@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Apr 24 2017
Cc'ing thestig@ as one of the reviewers of the CL listed in C#2, for more inputs or help in finding an appropriate owner for this.
,
Apr 24 2017
Tom, do you want to take this one? This should be merged into bug 352988 or vice versa.
,
Apr 24 2017
ok, I can pick this up soon. This issue is something that has annoyed me for a long time!
,
Apr 24 2017
|
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by jmukthavaram@chromium.org
, Apr 21 2017Labels: Needs-Feedback
5.5 MB
5.5 MB View Download