XDG and friends
According to (ArchWiki 2011) and (ArchWiki 2018):
xdg-utils provides the standard XDG MIME Application configurations, importantly
- user-specific overrides are saved at
/home/user/.config/mimeapps.list xdg-openwould open the file with the associated application as configured, in a blocking way- for example
XDG_UTILS_DEBUG_LEVEL=10 xdg-mime query default text/htmlqueries what application is associated withtext/html, and display the order howxdg-openlooks for the application xdg-settingsas far as I can tell modify/home/user/.config/mimeapps.list, and its scope is limited, seexdg-settings --list.xdg-mime default feh.desktop image/jpegalso modify/home/user/.config/mimeapps.list.
I prefer to modify the overrides file directly.
Reference
ArchWiki. 2011. “Xdg Mime Applications.” 2011. https://wiki.archlinux.org/title/XDG_MIME_Applications.
———. 2018. “Xdg-Utils.” 2018. https://wiki.archlinux.org/title/Xdg-utils.