New `MimeType` fields in .desktop

Eli Schwartz eschwartz at archlinux.org
Sun Feb 21 16:15:57 UTC 2021


On 2/21/21 11:10 AM, Eli Schwartz wrote:
> On 2/21/21 10:56 AM, Sebastian Pipping wrote:
>> we had exactly that in Gentoo where Gimp was taking over PDF files by
>> default, just because it can import PDF and hence announced that mime
>> type as supported.
>>
>> For Gentoo, my workaround was to rename gimp.desktop to zzz-gimp.desktop
>> during installation, and that's still done today [1], but it's nowhere
>> near a fix and not without problems [2].
>>
>> So if you get that situation improved, that would surely be nice.
>
> Never mind whether that's a bad workaround or a good workaround. How was
> that even *a* workaround in the first place? mimeinfo.cache is not
> ordered by filename.
> 
> Your "workaround" should be precisely as effective as standing on one
> foot and singing The Hedgehog Song.


... Correction: at least as of 2011.

As noted in
https://gitlab.freedesktop.org/xdg/desktop-file-utils/-/issues/3 just
the other day... this was finally "fixed" to at least deterministically
order results by filename. 8 years later.

destop-file-utils 0.24, released July 2019, has the relevant commit,
intended to help reproducible builds rather than the current issue under
discussion.

At least consecutive re-runs of update-desktop-database with no system
changes should not shuffle the defaults anymore. Unfortunately it still
doesn't preserve insertion order, so installing new applications will
still (deterministically) change the defaults.

That workaround now does something (it marks GIMP as very low priority
for *all* mimetypes).

-- 
Eli Schwartz
Arch Linux Bug Wrangler and Trusted User

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/xdg/attachments/20210221/5408ed26/attachment.sig>


More information about the xdg mailing list