Bug 49552 - xdg-open should support selecting/highlighting a file/folder
Summary: xdg-open should support selecting/highlighting a file/folder
Status: RESOLVED MOVED
Alias: None
Product: Portland
Classification: Unclassified
Component: xdg-utils (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium enhancement
Assignee: Portland Bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-06 07:00 UTC by Calum
Modified: 2019-02-16 13:34 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Calum 2012-05-06 07:00:32 UTC
Users have asked for highlighting a selected torrent file/folder in Downloads when using Deluge and I found that xdg-open does not support such an option. Searching around I also found Chromium[1] and other applications are affected so it is needing solved somehow.

On OSX there is a -R option for open which reveals the file/folder in Finder instead of opening and on Windows a '/select,' option exists for explorer.exe

Nautilus now supports such an option if you pass just a filename, although not folders, but it is a starting point and apparently Dolphin has a '--select' option.


[1]http://code.google.com/p/chromium/issues/detail?id=35499
Comment 1 Rex Dieter 2012-05-06 07:42:55 UTC
fyi, xdg-open is largely just a wrapper for other applications, so can't implement features to available to underlying tools.

I'm not sure xdg-open can know if the underlying tool can support this or not, but i'll see (e.g. like the nautilus case you mentioned)
Comment 2 Lei Zhang 2016-08-09 17:39:39 UTC
So now it's 4 years later and both Dolphin and Nautilus definitely support the ability to select a file in a folder:

nautilus -s /path/to/selected_file
dolphin --select /path/to/selected_file

Can we implement the feature in xdg-open? xdg-open can either:

a) Check the underlying tool's version number to make sure it supports selection, and fail with a particular error code if the underlying tool does not. Then the caller can decide on falling back or not.

b) Just attempt to run the underlying tool and see what happens. If the underlying tool reports an error, pass that back up to the caller.
Comment 3 Mickaël Schoentgen 2017-05-19 15:04:39 UTC
We need that feature, I will handle it. I will give a shot and try to figure it out how to contact authors and send a patch.
Comment 4 Teodor Petrov 2017-08-07 19:06:33 UTC
Code::Blocks needs this feature, too!
I guess we'll do the hack chromium does, but it is not pretty and it is complex.
So please add this feature.

The best option is to make it opt-in feature for filemanagers. Every filemanager can specify somewhere (if I understand it correctly this place is the desktop file) that it supports selecting and what is the command flag for this.

I'm sure all filemanagers will be updated pretty fast if this goes into the standard.
Comment 5 GitLab Migration User 2019-02-16 13:34:56 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xdg/xdg-utils/issues/58.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.