Discussion:
defaults.list or mimeapps.list?
Jerome Leclanche
2014-01-19 19:03:53 UTC
Permalink
I'm finding a lot of conflicting information. Which to use? I'm using
mimeapps.list currently, I was certain defaults.list was the
deprecated one but I need an official word on this.

J. Leclanche
Bastien Nocera
2014-01-21 08:48:54 UTC
Permalink
Post by Jerome Leclanche
I'm finding a lot of conflicting information. Which to use? I'm using
mimeapps.list currently, I was certain defaults.list was the
deprecated one but I need an official word on this.
mimeapps.list adds mime-types to a particular application.
defaults.list changes the default handler for a mime-type.
Jerome Leclanche
2014-01-21 10:52:12 UTC
Permalink
Post by Bastien Nocera
Post by Jerome Leclanche
I'm finding a lot of conflicting information. Which to use? I'm using
mimeapps.list currently, I was certain defaults.list was the
deprecated one but I need an official word on this.
mimeapps.list adds mime-types to a particular application.
defaults.list changes the default handler for a mime-type.
The mimeapps.list has a [Default Applications] section as well, which
is why I ask. And in any case, why have two files?

J. Leclanche
Rex Dieter
2014-01-21 17:01:17 UTC
Permalink
Post by Jerome Leclanche
I'm finding a lot of conflicting information. Which to use? I'm using
mimeapps.list currently, I was certain defaults.list was the
deprecated one but I need an official word on this.
See "Default application ordering" on
http://www.freedesktop.org/wiki/Specifications/mime-actions-spec/

In effect, its a bit implementation specific... gnome uses defaults.list,
kde uses a mixture of InitialPreference= key and mimeapps.list

-- Rex
Jerome Leclanche
2014-01-21 17:09:08 UTC
Permalink
Post by Rex Dieter
Post by Jerome Leclanche
I'm finding a lot of conflicting information. Which to use? I'm using
mimeapps.list currently, I was certain defaults.list was the
deprecated one but I need an official word on this.
See "Default application ordering" on
http://www.freedesktop.org/wiki/Specifications/mime-actions-spec/
In effect, its a bit implementation specific... gnome uses defaults.list,
kde uses a mixture of InitialPreference= key and mimeapps.list
-- Rex
_______________________________________________
xdg mailing list
http://lists.freedesktop.org/mailman/listinfo/xdg
Grmph.

For the record, this is what I use, and what makes the most sense:
https://github.com/Adys/python-xdg/blob/master/xdg/actions.py#L120

1. Unalias the mime type
2. Check default application (in mimeapps.list)
3. Check added associations (mimeapps.list)
4. Check cached associations (mimeinfo.cache), discarding excluded
ones (mimeapps.list)
5. Recursively do the same for every parent of the mime type.

I'm having a deja vu here, I think this was brought up before. Anyway...

J. Leclanche
David Faure
2014-02-02 10:32:51 UTC
Permalink
Post by Rex Dieter
Post by Jerome Leclanche
I'm finding a lot of conflicting information. Which to use? I'm using
mimeapps.list currently, I was certain defaults.list was the
deprecated one but I need an official word on this.
See "Default application ordering" on
http://www.freedesktop.org/wiki/Specifications/mime-actions-spec/
In effect, its a bit implementation specific... gnome uses defaults.list,
kde uses a mixture of InitialPreference= key and mimeapps.list
This is a strange way of presenting it. The same mixture exists everywhere.

The environment defaults are environment-specific, using defaults.list in
Gnome and InitialPreference= in KDE.

On top of that, mimeapps.list is standard, and can be used at the system level
(/usr/share) by ISVs or at the user-level to store user-specific overrides.
--
David Faure, ***@kde.org, http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5
Rex Dieter
2014-02-03 02:50:06 UTC
Permalink
Post by David Faure
Post by Rex Dieter
Post by Jerome Leclanche
I'm finding a lot of conflicting information. Which to use? I'm using
mimeapps.list currently, I was certain defaults.list was the
deprecated one but I need an official word on this.
See "Default application ordering" on
http://www.freedesktop.org/wiki/Specifications/mime-actions-spec/
In effect, its a bit implementation specific... gnome uses defaults.list,
kde uses a mixture of InitialPreference= key and mimeapps.list
This is a strange way of presenting it. The same mixture exists everywhere.
The environment defaults are environment-specific, using defaults.list in
Gnome and InitialPreference= in KDE.
On top of that, mimeapps.list is standard, and can be used at the system
level (/usr/share) by ISVs
In my experience, stuff set in mimeapps.list in /usr/share isn't used by
gnome. Should I go retest that?

-- Rex
A. Walton
2014-02-05 21:56:31 UTC
Permalink
Post by Rex Dieter
Post by David Faure
Post by Rex Dieter
Post by Jerome Leclanche
I'm finding a lot of conflicting information. Which to use? I'm using
mimeapps.list currently, I was certain defaults.list was the
deprecated one but I need an official word on this.
See "Default application ordering" on
http://www.freedesktop.org/wiki/Specifications/mime-actions-spec/
In effect, its a bit implementation specific... gnome uses
defaults.list,
Post by David Faure
Post by Rex Dieter
kde uses a mixture of InitialPreference= key and mimeapps.list
This is a strange way of presenting it. The same mixture exists everywhere.
The environment defaults are environment-specific, using defaults.list in
Gnome and InitialPreference= in KDE.
On top of that, mimeapps.list is standard, and can be used at the system
level (/usr/share) by ISVs
In my experience, stuff set in mimeapps.list in /usr/share isn't used by
gnome. Should I go retest that?
You should go retest that. The code is supposed to load mimeapps.list and
defaults.list from $XDG_DATA_DIRS and the system data dirs (usually
/usr/local/share/:/usr/share).

Here's the code.
https://git.gnome.org/browse/glib/tree/gio/gdesktopappinfo.c

-A. Walton
Post by Rex Dieter
-- Rex
_______________________________________________
xdg mailing list
http://lists.freedesktop.org/mailman/listinfo/xdg
Rex Dieter
2014-03-13 18:31:00 UTC
Permalink
Post by A. Walton
Post by Rex Dieter
In my experience, stuff set in mimeapps.list in /usr/share isn't used by
gnome. Should I go retest that?
You should go retest that. The code is supposed to load mimeapps.list and
defaults.list from $XDG_DATA_DIRS and the system data dirs (usually
/usr/local/share/:/usr/share).
Here's the code.
https://git.gnome.org/browse/glib/tree/gio/gdesktopappinfo.c
Thanks, ironically looks like the problem I experienced recently was due to
a kde bug,
https://bugs.kde.org/show_bug.cgi?id=332107

where my prefered/custom value of XDG_DATA_DIRS ended up being ignored. :(

-- Rex

Samuli Suominen
2014-02-06 06:10:18 UTC
Permalink
Post by Rex Dieter
Post by David Faure
Post by Rex Dieter
Post by Jerome Leclanche
I'm finding a lot of conflicting information. Which to use? I'm using
mimeapps.list currently, I was certain defaults.list was the
deprecated one but I need an official word on this.
See "Default application ordering" on
http://www.freedesktop.org/wiki/Specifications/mime-actions-spec/
In effect, its a bit implementation specific... gnome uses defaults.list,
kde uses a mixture of InitialPreference= key and mimeapps.list
This is a strange way of presenting it. The same mixture exists everywhere.
The environment defaults are environment-specific, using defaults.list in
Gnome and InitialPreference= in KDE.
On top of that, mimeapps.list is standard, and can be used at the system
level (/usr/share) by ISVs
In my experience, stuff set in mimeapps.list in /usr/share isn't used by
gnome. Should I go retest that?
-- Rex
I'm sure it's used by GNOME and Xfce.

Personally I always thought that defaults.list was the global file,
because that's what the Debian GNOME Team is using
to set their default applications for the users
And that mimeapps.list in user's own local directory was to override
that global defaults.list
I see now I was wrong, and that mimeapps.list can also be used globally
and that Debian still using defaults.list is just for historical reasons

Xfce's utilities modify mimeapps.list at users directory when defining
preferred applications / file associations
I would expect GNOME to do same thing thesedays

So heck, just to drop the confusion, could the defaults.list be declared
obsolete somewhere so that the confusion stops?
Jerome Leclanche
2014-02-06 06:34:10 UTC
Permalink
Post by Samuli Suominen
Post by Rex Dieter
Post by David Faure
Post by Rex Dieter
Post by Jerome Leclanche
I'm finding a lot of conflicting information. Which to use? I'm using
mimeapps.list currently, I was certain defaults.list was the
deprecated one but I need an official word on this.
See "Default application ordering" on
http://www.freedesktop.org/wiki/Specifications/mime-actions-spec/
In effect, its a bit implementation specific... gnome uses defaults.list,
kde uses a mixture of InitialPreference= key and mimeapps.list
This is a strange way of presenting it. The same mixture exists everywhere.
The environment defaults are environment-specific, using defaults.list in
Gnome and InitialPreference= in KDE.
On top of that, mimeapps.list is standard, and can be used at the system
level (/usr/share) by ISVs
In my experience, stuff set in mimeapps.list in /usr/share isn't used by
gnome. Should I go retest that?
-- Rex
I'm sure it's used by GNOME and Xfce.
Personally I always thought that defaults.list was the global file,
because that's what the Debian GNOME Team is using
to set their default applications for the users
And that mimeapps.list in user's own local directory was to override
that global defaults.list
I see now I was wrong, and that mimeapps.list can also be used globally
and that Debian still using defaults.list is just for historical reasons
Xfce's utilities modify mimeapps.list at users directory when defining
preferred applications / file associations
I would expect GNOME to do same thing thesedays
So heck, just to drop the confusion, could the defaults.list be declared
obsolete somewhere so that the confusion stops?
Christ please yes.

J. Leclanche
Post by Samuli Suominen
_______________________________________________
xdg mailing list
http://lists.freedesktop.org/mailman/listinfo/xdg
David Faure
2014-03-02 11:29:34 UTC
Permalink
Post by Samuli Suominen
So heck, just to drop the confusion, could the defaults.list be declared
obsolete somewhere so that the confusion stops?
It depends if you want the app order to affect only gnome (-> defaults.list)
or all desktop environments (-> mimeapps.list).

I think there's a use case for both, so I wouldn't declare defaults.list
obsolete.
--
David Faure, ***@kde.org, http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5
Samuli Suominen
2014-03-02 11:33:50 UTC
Permalink
Post by David Faure
Post by Samuli Suominen
So heck, just to drop the confusion, could the defaults.list be declared
obsolete somewhere so that the confusion stops?
It depends if you want the app order to affect only gnome (-> defaults.list)
or all desktop environments (-> mimeapps.list).
gnome has used mimeapps.list (since that's what glib uses) for a long
time now
and that's not the way of setting them desktop specific, setting
XDG_DATA_DIRS=
to include /usr/share/gnome in which the desktop specific .list is,
from eg. /etc/X11/xinit/xinitrc.d/99-gnome, is
Post by David Faure
I think there's a use case for both, so I wouldn't declare defaults.list
obsolete.
nope
Loading...