Default Program | File Association

nf2 nf2 at scheinwelt.at
Fri Jan 25 03:01:32 PST 2008


David Faure wrote:
> After discussion with Alexander on IRC we came to the following adjustement:
>
> * being able to add an application to a mimetype in defaults.list even if the application
> .desktop file does not mention this mimetype. This removes the need for making local
> copies of desktop files.
>
> * being able to remove associations, in the defaults.list file, using a separate group like this:
> [Removed Associations]
> image/x-xwindowdump=kview.desktop;    
>
> This way the app-mime association list is fully editable (you can add and remove),
> and no duplication of system settings is done (so if the sysadmin updates his higher-level
> defaults.list you'll still get those changes, except for the associations that have been
> explicitely removed this way).
>   
>

That's cool. There is just one problem - different desktops have 
different default applications. Thus there could be two (or more)

/usr/share/applications/KDE.defaults.list
/usr/share/applications/GNOME.defaults.list

I would extend the format with a "flavor" key in the header. A library 
like GIO would try to detect the current dektop (similar to xdg-utils) 
and then pick the right defaults.list flavor.

Perhaps the "Default URL Handler" issue could be solved with the 
defaults.lists as well. (see this 
http://bugzilla.gnome.org/show_bug.cgi?id=509615 - launching the right 
URL-handler requires access to desktop specific configuration systems at 
the moment, which is not optimal)

[Defaults List]
flavor=KDE,*

[Default Applications]
application/x-dia-diagram=...

[Removed Associations]
...

[Default URL Handlers]
mailto=thunderbird.desktop
...


regards,

Norbert
















More information about the xdg mailing list