Re: What controls the default ordering of which application handles an opened file?
- Date: Mon, 18 Feb 2019 09:26:44 -0700
- From: Nate Graham <nate@xxxxxxx>
- Subject: Re: What controls the default ordering of which application handles an opened file?
On 11/16/17 6:29 AM, Harald Sitter wrote:
The KService frameworks supports a special desktop entry key 
`X-KDE-InitialPreference` meaning to solve this. It assigns a custom
preference score (higher=more preferred) to all mime types associated
with the desktop file.
To solve the problem with krita there probably needs to be a separate
krita desktop file which is `NoDisplay=true` and only associates with
the krita mimetype `MimeType=application/x-krita;` and sets
`X-KDE-InitialPreference=10` to gain preference over gwenview. This
will only impact kde-frameworks based software though, other xdg spec
compliant mimetype handlers do not necessarily respect our
In the end I don't think there is a proper cross-desktop way of doing
this by default. Usually people simple set X-KDE-InitialPreference and
I finally got around to implementing this, more than a year later. :)
Thanks for your help, Harald. You definitely pointed me in the right
Here are the patches: