New `MimeType` fields in .desktop

Thayne astrothayne at gmail.com
Thu Feb 18 17:11:09 UTC 2021


On Thu, Feb 18, 2021 at 4:51 AM Simon McVittie <smcv at collabora.com> wrote:
>
> On Thu, 18 Feb 2021 at 00:36:22 -0700, Thayne wrote:
> > I'd like to point out that on Ubuntu 20.04 there are no system
> > mimeapps.list files provided (either for DE or globally).
>
> It seems like an Ubuntu bug report would be appropriate, if that's true.
> Debian has at least these:
>
> cinnamon-desktop-data: /usr/share/applications/x-cinnamon-mimeapps.list
> gnome-session-common: /usr/share/applications/gnome-mimeapps.list
>
> and I'd be surprised if Ubuntu has taken steps to remove the one shipped
> by Debian when deriving their gnome-session package from Debian's...
>

Ubuntu does have a /usr/share/applications/defaults.list, which the
arch wiki says is a deprecated predecessor to mimeapps.list. So maybe
it's supposed to use that instead...

The files included in gnome-session-common on Ubuntu 20.04 are:

/etc/X11/Xsession.d/55gnome-session_gnomerc
/etc/profile.d/xdg_dirs_desktop_session.sh
/usr/share/doc/gnome-session-common/changelog.Debian.gz
/usr/share/doc/gnome-session-common/changelog.Debian.gz

so apparantly it does differ fromthe Debian package?

> > It also puts the burden of
> > maintaining that list on package maintainers rather than distributing
> > it among applications developers.
>
> A distribution's *entire job* is integration: taking software produced by
> lots of disparate application developers (each developer presumably
> thinking the application they maintain is the best, otherwise they wouldn't
> still be maintaining it) and putting it together into something that works
> as an overall system. This is necessarily going to involve some opinionated
> decisions, both in what the distribution installs by default and in what
> the distribution lists as preferred.
>

Not all distributions are so opinionated though. Archlinux for example
has a key tenet of being as close to upstream as possible and not
making decisions about which software is preferred (for the most
part). Similarly minimal window managers like i3, sway, openbox, dwm,
etc. are not very opinionated on which applications the user uses
(unlike say GNOME or KDE). And even when the distribution *is*
opinionated, it's unlikely they have an opinion on *every possible
MIME type*.  Furthermore, even if the packagers curate the default
applications, I don't think it is unreasonable to have a standard way
for application developers to give a hint as to how an application
uses a MIME type, so that for example, GIMP isn't set as the default
for PNG and JPEG.

I think there is value in allowing applications to specify that some
mime types are less important than others (like PNG/JPEG for gimp, or
text files for Libreoffice), and the fallback mechanism for mime types
should take that into account. I also think that even if the fallback
mechanism should at least be consistent. Maybe it picks the last
installed package (but not last updated), or the first installed
package, or even sorting based on a hash of the application name, but
it is hard to think of a worse experience than picking one randomly.


More information about the xdg mailing list