[New] Desktop Preferred Applications Specification

Patrice Dumas pertusus at free.fr
Sun Jun 7 02:30:51 PDT 2009

On Sun, Jun 07, 2009 at 01:52:14PM +0800, PCMan wrote:
> Hi list,
> To solve the issue that every desktop environment has its own way to
> specify default web browser and terminal emulator, I wrote a new spec
> to create a cross-desktop mechanism for this. This spec works by
> extending existing XDG specs and only requires minimal changes to
> existing systems without breaking backward compatibility. Besides, it
> can work in an desktop independent way, and can work with existing xdg
> tools like desktop-utils.
> Here is the full specification.
> http://wiki.lxde.org/en/Desktop_Preferred_Applications_Specification

I think that you are mixing up different issues. One is selecting an
application to open a given URI, on the protocol/scheme level as opposed
to the document type level. The other is the selection of a 
default application to do something. xdg-open (and kfmclient, gnome-something,
exo-open) do the former, but work at the document type level (and gio/kio
understands a lot of scheme/protocols), while update-alternatives does 
the latter (there is another program I don't remember for users, using 
environment variables, if I recall well).

I think that 2 cases should be separated:
1) opening an URI or a document (a file). In that case the application 
 should be chosen with
   * document type
   * scheme/protocol (based on the URI scheme part), or specifying that the
     application uses a vfs backend, with a standard location for the schemes
     the vfs backend handles

2) starting an application to accomplish a given task which is not associated
 with an URI or a document (notably launching a terminal emulator)
   * using a pseudo mimetype would be right 

And then the issue of selecting a default application to do 1) or 2) could
be tackled.

For 1) I did a proposal that you can see here, with follow up, especially
interesting ones regarding vfs stuff by David Faure and Vincent Untz, and also 
Jaap Karssenberg proposed something (that maybe could also work for 2):

As an example


would mean that the application knows how to handle http, and can use all the 
protocols handled by kio, which would be listed in $XDG_DATA_DIRS/vfs/*.desktop
in a protocol entry.

For the selection of a default application (and also opening a file or
URI in a desktop agnostic way), you could have a look at mimeopen, which
is in
there is a way to specify defaults.


More information about the xdg mailing list