open file in directory action
Hans de Goede
hdegoede at redhat.com
Sun Apr 21 12:35:47 PDT 2013
Hi All,
Vincent, please do *not* send html mails to this mailinglist
(or any FOSS related mailinglist for that matter), thanks!
On 04/21/2013 08:19 PM, Vincent Gerris wrote:
> Dear fellow freedesktop users,
>
> As a longtime Linux Desktop user (currently Ubuntu 13.04) I continuously look for ways to make Linux even better on the desktop.
> I often do that by comparing it to the commercial vendors and listening to user feedback from my environment (especially from those I freed from Windows :) ).
> One of the things I came across was the way the filemanager behaves after selecting a file and choosing show in folder.
> The best example I can think of, is when a file is downloaded in Firefox and the user action "Open Containing Folder" is used.
> On Mac OS X and Windows, when this action is used, the folder is opened in the file manager and the file where the action was applied on, is selected.
> In Linux (more specific Fedora 17 and Ubuntu 13.04 and probably most other distro's), only the folder is shown, while the file is not selected.
> From a user point of view, that can be very disappointing, because you would have to find that file among a possible big pile of other files.
>
> I discussed with somebody who has quite some knowledge of the matter (and a lot of other Linux matters :), Hans de Goede
That would be me :)
> and together we tried some things to see if this is possible in Linux and if so, how.
> We made an assumption: xdg-open is used to select the file. That should be double checked.
Let me clarify this a bit, what Vincent means here, is that we assume that for things like
the "Open containing folder" function in firefox' Download Manager apps use the desktops
preferred applications config, looking what app to use for "text/directory".
xdg-open, which will invoke ie gnome-open was an example I gave to Vincent of an app using
the desktops preferred applications config.
BTW I was a bit surprised that there is not standard for setting preferred applications for
opening mime-type foo in a desktop agnostic manner. I noticed that exo-open and gnome-open
seem to use the same underlying config, but I can not find any fdo standard for this ?
> Looking in that direction, we found that xdg-open does not provide a way to select a file in a folder.
> While nautilus is able to do this, as are konquerer and dolphin, only Thunar does not seem to have a way to do this.
>
> My question and partly proposal to developers would be to implement such functionality.
> For example, a command xdg-open-file-in-directory which will have similar functionality as xdg-open, but with functionality that will select the file that is being called upon.
> If the filemanager used does not have such functionality, it can behave as would xdg-open.
> If I understand correctly, that would involve adding an additional mime type, is that correct?
To clarify once more, the idea is to define a new mime type text/file-in-directory which
apps can use for the functionality of opening the folder containing a file in the default
file-manager. The difference with text/file would be that the associated action takes (a)
path(s) to a file(s), rather then to directories.
IE nautilus would advertise in its .destkop file that it can be used to open "files" of
this type with a simple "nautilus %F" as action. konqueror and dolphin would also advertise
this but with an Exec value of "konqueror --select %F" resp "dolphin --select %F".
Apps which want to use the text/file-in-directory type will need to fallback to using
text/directory (and passing the directory) when no default app is set for the type.
Regards,
Hans
More information about the xdg
mailing list