3

I have an Aweseome-wm + xfce system.

Where does xfce4-mime-settings stores its values? In particular as regards default apps.
The GUI values are different for me from those on ~/.config/mimeapps.list and they have precedence over the latter.

Some defaults programs are stored in:

~/.config/xfce4/helpers.rc
/etc/xdg/xfce4/helpers.rc

But that does not include PDF types.

2
  • by GUI you mean xfce4-mime-settings? In my case xfce4-mime-settings, exo-open and thunar are all coherent mimeapps.list so I can only assume that xfce4-mime-settings is using some file related to awesome-wm or the file manager you use (if not thunar) before mimeapps.list
    – lmcanavals
    Mar 27, 2019 at 14:13
  • @MartínCanaval: Yes I meant xfce4-mime-settings GUI. exo-open and thunar are coherent with the GUI for me too, but man exo-open does not make it clear to me where exo-open takes the name of the app to open a PDF. Also, if I change the reader app in xfce4-mime-settings, exo-open updates its behaviour, so the latter seems not dictated by awesome-wm.
    – antonio
    Mar 27, 2019 at 17:36

2 Answers 2

4

Upon trial and error in a docker, I realised what follows.

xfce4-mime-settings reads associations in preference order from:

  1. $HOME/.config/mimeapps.list
  2. /usr/share/applications/mimeinfo.cache

Actual directories are affected by $XDG_CONFIG_HOME, $XDG_CONFIG_DIRS, and $XDG_DATA_DIRS and it is possible to have also a DE specific version of mimeapps.list with higher preference, such as xfce-mimeapps.list.
See Association between MIME types and applications

If the user modifies settings in xfce4-mime-settings, they are saved to $HOME/.config/mimeapps.list.

The file /usr/share/applications/mimeinfo.cache can be created from scratch or updated with the standard utility from freedesktop.org desktop-file-utils

sudo update-desktop-database 

i still don't know if there is tool to bulk-populate $HOME/.config/mimeapps.list

With respect to my question, apparent idiosyncaracies are solved by inspecting the cache (mimeinfo.cache).

5
  • The information might be not totally accurate, so I will not yet close the question. In particular, I'd to find more about the generation of ~/.config/mimeapps.list.
    – antonio
    Jul 4, 2019 at 23:39
  • This answer is correct, but it misses subclasses. For example, inode/mount-point (see /usr/share/mime/inode/mount-point.xml) is missing in mimeapps.list, because it is a subclass of inode/directory, yet is shown seperately in xfce4-mime-settings.
    – phil294
    Jan 20, 2022 at 23:44
  • There is a tool to bulk set default mime type apps, calle selectdefaultapplication. It is listed in the Arch wiki. But this tool also misses subclasses.
    – phil294
    Jan 21, 2022 at 0:11
  • 1
    Sorry for spamming, but subclasses are listed under /usr/share/mime/subclasses
    – phil294
    Jan 21, 2022 at 0:13
  • Wow talk about unchecked config file multiplication! All of what is needed to make a mimetype should be set with one line in /etc/mime.types or $HOME/.mime.types, yet I find myself rummaging through no less than a dozen directories and individual 40 line .xml files for each and every mimetype, and that does not include the association of mimetypes with applications.
    – Max Power
    Jan 26 at 23:00
-2

The file can be found at:

/usr/share/applications/mimeinfo.cache

3
  • 2
    While this may very tersely answer the question of "Where does xfce4-mime-settings stores its values?" it's been flagged as low-quality because of its terseness. I'll clear the flags, but is there any chance you could add some verbiage to this answer; even make a sentence of it? Thank you!
    – Jeff Schaller
    Jul 2, 2019 at 13:47
  • 1
    Are you sure it saves configuration in what is presumably a root-owned location?
    – muru
    Jul 3, 2019 at 11:27
  • @JeffSchaller: he is right. I also added what I have found in a separate answer
    – antonio
    Jul 4, 2019 at 23:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .