Default File Manager

Thiago Macieira thiago at
Tue Nov 29 16:32:00 PST 2011

On Tuesday, 29 de November de 2011 15.57.51, Sander Jansen wrote:
> Is there a cross-desktop way of determining the default file manager
> to use? I want to show show a specific folder and/or file in the file
> manager. I was hoping to perhaps use the mimeinfo.cache /
> mimeapps.list / defaults.list to find this out, but not sure how
> cross-desktop this really is (and what mimetype to check for:
> x-directory, inode-directory?).
> Or should I use something more elaborate, like determining the current
> desktop environment (is there a standard for doing this, I know some
> set DESKTOP_SESSION in the environment) and guess from there.

What happens if you xdg-open the directory you want shown?

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.
Thiago Macieira - thiago (AT) - thiago (AT)
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <>

More information about the xdg mailing list