New issue
Advanced search Search tips

Issue 713630 link

Starred by 3 users

Issue metadata

Status: Duplicate
Merged: issue 352988
Owner: ----
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

Support org.freedesktop.FileManager1 interface in platform_util ShowItem

Reported by bajk...@googlemail.com, Apr 20 2017

Issue description

UserAgent: 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/
 
Cc: jmukthavaram@chromium.org
Labels: Needs-Feedback
Unable to reproduce the issue on Ubuntu 14.04, Windows 7 & mac 10.12.4 Using chrome reported version-57.0.2987.133,stable-58.0.3029.81  & Canary-60.0.3076.0 as per the steps mentioned in comment#0.
Observed the downloaded file is highlighted in 'downloads' folder. No need to search the downloaded file manually.

Please find the attached screencast for reference & let us know your observations.

Thank you...!
713630.mp4
5.5 MB View Download
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/
Project Member

Comment 3 by sheriffbot@chromium.org, Apr 21 2017

Labels: -Needs-Feedback
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

Comment 4 by ajha@chromium.org, Apr 24 2017

Cc: thestig@chromium.org
Components: -UI UI>Browser>Downloads
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.
Cc: thomasanderson@chromium.org
Tom, do you want to take this one? This should be merged into bug 352988 or vice versa.
ok, I can pick this up soon.  This issue is something that has annoyed me for a long time!
Mergedinto: 352988
Status: Duplicate (was: Unconfirmed)

Sign in to add a comment