You are not logged in.

#1 2025-04-11 05:01:00

ArchEr9
Member
Registered: 2025-03-18
Posts: 39

Clarification on XDG Desktop MIME type

In the Arch wiki entry for XDG Desktop's MIME Type, it is mentioned that

Default applications for each MIME type are stored in mimeapps.list files, which can be stored in several locations. They are searched in the following order, with earlier associations taking precedence over later ones:

~/.config/mimeapps.list
/etc/xdg/mimeapps.list
/etc/xdg/desktop-mimeapps.list

Where desktop-mimeapps.list has to be replaced with the equivalent DE name. For example for XFCE the filename will be xfce-mimeapps.list.

So if there are say 2 files ~/.config/mimeapps.list and /etc/xdg/mimeapps.list all the mime types entries will be read from both the files and whatever is there in ~/.config/mimeapps.list will override what is given in /etc/xdg/mimeapps.list?
OR
The system will only read the first file, in this case ~/.config/mimeapps.list and discard the remaining files?

And finally about linking the file ~/.local/share/applications/mimeapps.list to ~/.config/mimeapps.list. Is it still required? Are there any applications which still use ~/.local/share/applications/mimeapps.list

Offline

#2 2025-04-11 08:10:22

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,774

Re: Clarification on XDG Desktop MIME type

There's no "system", if you want to know what a specific process looks at, strace it.
The defined standard is described in the linked https://specifications.freedesktop.org/ … /file.html
As for clarifications

The wiki wrote:

They are searched in the following order

The job is not to find a file but a mime association the search does not end when finding "a" file, does it?

If you want to change anything here, use eg. https://wiki.archlinux.org/title/Xdg-utils#xdg-mime or GUI tools provided by your DE.
Don't endit those files manually unless you know what you're doing.

Offline

Board footer

Powered by FluxBB