New `MimeType` fields in .desktop
Bastien Nocera
hadess at hadess.net
Wed Feb 17 22:52:52 UTC 2021
On Wed, 2021-02-17 at 22:07 +0100, Jehan Pagès wrote:
> <snip>
> There is also something which I am not fond of with the order
> depending on a shared database: we must agree on an order which might
> not be fair. Say 2 applications are on the exact same action fields,
> i.e. they both work on the same file formats (for instance JPEG, PNG
> for image viewers). If the defaults depend on this shared database,
> then the same one will consistently be the default image viewer
> shadowing (if installed) all the others. Be it based on character
> order (then you'd want to just name your app "aaa") or just whatever
> the database maintainer prefer for oneself, it's not right.
It's not a database, it's a default configuration for various desktops.
As mentioned in my previous email, it's also likely to be easily
changed in the "default applications" panel in GNOME, and equivalent
somewhere else.
> On the other hand, when no order is specified centrally, but each
> software is able to tell its intent "I'm made to display JPEG, PNG…"
> without specifying priority relatively to other software, at least we
> can go with fairer algorithm (something not based on an arbitrary
> choice making a strict order). Be it "last installed" or "keeping
> stability to whatever was here first" (then it will likely be
> dependent on your desktop choice during install, and distrib
> maintainers, at least not the same on all distributions).
The order for mime-types with no defaults has nothing to do with a
"shared database", it's implementation specific, as it's not codified
in the mime specs. GLib probably behaves differently than Qt does,
which means that the file managers using either of those are likely to
behave differently.
If you want to solve this problem, you'll probably need to figure out
whether their behaviour is intentional, and then change the specs to
clarify the intended behaviour.
More information about the xdg
mailing list