Default File Manager

Sander Jansen s.jansen at gmail.com
Wed Nov 30 06:57:49 PST 2011


On Wed, Nov 30, 2011 at 1:38 AM, Thiago Macieira <thiago at kde.org> wrote:
> On Tuesday, 29 de November de 2011 21.23.26, Sander Jansen wrote:
>> > I don't think there's any way to show a directory with a specific file
>> > selected. Maybe we could standardise on using the URL fragment for that
>> > purpose, e.g.:
>> >
>> >        xdg-open file:///home/thiago/#valgrind.supp
>> >
>> > This URL above works right now, except it won't pre-select valgrind.supp.
>>
>> That should only work if the input is an url. It shouldn't do the same
>> if file:/// is left out.
>
> That depends on the implementation. Does it treat a string with no scheme as a
> relative file path or a relative URI reference? They are not the same and are
> not interpreted the same. The --help output says:
>
> Synopsis
>
>   xdg-open { file | URL }
>
> It doesn't specify what type of URL it accepts, but common sense would dictate
> that it accepts only absolute URLs. Any relative strings are interpreted as
> file paths, not as relative URL references.
>
> In any case, the ambiguity is completely resolved by passing a full and
> absolute URL.


Agreed.


>> A basic show-this-file in the browser would
>> be nice to have. I guess for more elaborate file operations a "file
>> manager dbus interface" will be better. Which gets us back to the
>> problem on how do determine what file manager to start in cross
>> desktop neutral way. It would be nice if we didn't need to use any of
>> the native tools (exo-open,gvfs-open) and just rely on the
>> inode/directory mimetype in the mimecache.
>
> I still wonder what your use-case is. Why do you need the file manager to open
> up with a specific entry selected? What other operations do you have in mind?

Simple use case, in Chromium when you have downloaded a file, besides
giving the ability to "Open the file", it provides a "Show in Folder".
This is really for handy when it was stored in your Downloads folder
and want to move it somewhere else, or simply rename. In my case, my
downloads folder is pretty big, so usually the next operation is to
scroll through list and find where the file I just downloaded is
located. Having the file selected/highlighted would be really useful.

In my own application, a music manager, I'd like to ability to do
something similar. Show the file of the selected track in your file
browser.

>
> In most cases when people ask how to determine an application, they don't
> actually need to know the application. They just need the system to perform
> some operation and xdg-open already solves most of those problems.
>

By pass xdg-open and start the file manager directly. Or provide a
user-friendly menu name as in "Show in Dolphin", or "Show in Thunar".

Cheers,

Sander


More information about the xdg mailing list