Default Program | File Association

nf2 nf2 at scheinwelt.at
Fri Jan 25 04:10:51 PST 2008


Alexander Larsson wrote:
> On Fri, 2008-01-25 at 12:01 +0100, nf2 wrote:
>   
>> 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
>>     
>
> This is up to the distribution/sysadmin/user to handle. If you want to
> do some kind of desktop-specific handling you can just add a desktop
> specific directory to the XDG_DATA_DIR env var. And for extremely
> specific things you can use OnlyShowIn/NotShowIn.
>
> Doing it with two different files is a very bad idea. I mean, what file
> would a third party app use? And why should a kde and a gnome app
> running in the same session launch different apps for the same files?
>
>   

I meant the opposite. Regardless which stack an application links to 
(GIO, kdelibs,...), the defaults.list flavor would be picked according 
to the currently running desktop. But perhaps setting XDG_DATA_DIR would 
also work. I just wanted to address the situation where users have 
multiple desktops installed and for instance would expect something like 
GEdit to be default on GNOME and KWrite on KDE. You can't use 
OnlyShowIn/NotShowIn for this, as some GNOME users might want to use 
KWrite or vice versa. Perhaps a DefaultIn= desktop entry key would also 
be an option...







More information about the xdg mailing list