View Full Version : [all variants] I suggest implementing x-file-manager

March 28th, 2009, 08:44 AM
I want to implement a default file manager for all the X desktops I use.
There is a system for defining a default terminal, browser, window manager, and session manager using:


which are links to /etc/alternatives/xxxxx

They enable you to set up the above default programs by simply defining a link.

If /usr/bin/x-file-manager was also defined and used by applications, one could easily set up a default X file manager.

Any support for this suggestion?

March 28th, 2009, 08:50 AM
why? you already decide what file manager to use, it's not like your using your file manager of choice and when you click a folder another file manager opens.

March 28th, 2009, 08:53 AM
Ah, there are many applications that open a file manager, one for example is the archiver application which offers to open the extracted file directory after extracting, download applications which open the download directory, and more...

March 28th, 2009, 09:22 AM
makes since i guess for those that use a desktop that has a default file manager.

for now there's always the work around. :)

March 28th, 2009, 11:59 AM
Sounds similar to the Freedesktop.org Portland project.


The XdgUtils (http://portland.freedesktop.org/wiki/XdgUtils) have some abstractions to hide desktop-specific operations like composing an email or starting a web browser.

March 28th, 2009, 12:10 PM
Interesting, xdg-open opens urls and files, maybe it knows how to open a folder, thanks.

March 28th, 2009, 12:36 PM

xdg-mime query filetype /home/jeffgives the result


xdg-mime default /usr/share/applications/pcmanfm.desktop application/x-directorymakes pcmanfm the default application for opening directories

xdg-open /home/jefffails with this output

Warning: unknown mime-type for "/home/jeff" -- using "application/octet-stream"
Error: no "view" mailcap rules found for type "application/octet-stream"
and yet above xdg-mime figured that it does have a mimme type application/x-directory

I must be missing something, any ideas?

March 28th, 2009, 03:56 PM
I am on Hardy:

$ xdg-mime query filetype ~

$ xdg-mime query default x-directory/normal

$ xdg-open ~

<Nautilus Pops Up, showing my home directory>

March 28th, 2009, 04:07 PM
BTW I am running Gnome.

xdg-open detect Gnome and then calls

gnome-open ~

which brings up nautilus. I am not sure of behavior in other DEs.

You can do

sh -x /usr/bin/xdg-open ~

to see what the script does to perform the requested action.

March 28th, 2009, 08:50 PM
Under Gnome I have the same behavior as you .
It will only open Nautilus, even if I set up pcmanfm as the default.
I will play some more and see what happens

March 29th, 2009, 07:47 AM
It seems that the reason for differences between xdg-open behavior on different desktops is that xdg does not use it's own database but updates the databases of the desktop.