New `MimeType` fields in .desktop

Charles Plessy charles-listes+xdg at plessy.org
Thu Feb 18 14:52:11 UTC 2021


Le Tue, Feb 16, 2021 at 05:11:36PM +0100, Jehan Pagès a écrit :
> 
> Hello all!

Hello Jehan and everybody!

> Typically someone reported an issue about GIMP taking over handling of
> image types it supports every time it is installed/updated. So for
> instance JPEG images were not displayed by default with a simple image
> viewer anymore, but in GIMP.

In Debian we are automatically translating Desktop entry files to
Mailcap entry files, and we hit a similar problem: suddenly the Mailcap
users would open PDF documents with GIMP by default…

http://charles.plessy.org/Debian/debi%C3%A2neries/pdf/index.en.html

A change of the Desktop entry specification going in the direction you
propose would allow us to give lower Mailcap priorities to programs
declaring that they do not aim at being the default for a given media
type.

> So I would propose 2 fields with the same syntax as MimeType field:
> 
> - NativeMimeType: the list of mime types which can be considered as the
> native formats of the software. For instance for GIMP:
> 
> - IntentMimeType: the list of supported mime types which can be considered
> of the same nature as the native mime types, the same "intent" files.

One downside with this approach is that if you update GIMP's Desktop
entry file and it is read by a program that is not supporting the
proposed new version of the specification, the most important media
types might be ignored.

Instead, how about having a new field (for instance ExtraMimeType) for
indicating the lower-priority media types.  Then software like GIMP
could "demote" them in the new field, and at worse if the new field is
not parsed, then the native or intended types will still be recognised.

Have a nice day,

Charles, maintainer of the mailcap and media-types packages in Debian.

-- 
Charles Plessy                         Nagahama, Yomitan, Okinawa, Japan
Tooting from work,           https://mastodon.technology/@charles_plessy
Tooting from home,                 https://framapiaf.org/@charles_plessy


More information about the xdg mailing list