How to manage file associations in Gnome.
First, a caveat: I’m no expert on the subject. What follows is what I’ve learned empirically while investigating particular problems I’ve had, so this information is by no means complete.
To change the association of a particular file type for a particular user, open Nautilus as that user and find any file of that type. Right click on the file and select Properties – Open With. Change as desired.
The Properties – Open With tab probably offered you several choices. These choices come from the .desktop files in ~/.local/share/applications/ and can be directly edited.
TODO: Make some sense of the following clues:
* ~/.local/share/mime/globs, and it’s reference to the update-mime-database command (see also man update-mime-database).
* It is stated that Gnome file associations are stored system wide at /usr/share/applications/defaults.list and per-user at ~/.local/share/applications/defaults.list, although in my case what they contain does not conform to Nautilus’s behavior.
* See the contents of ~/.local/share/mime/, /usr/share/mime/, and /usr/share/doc/shared-mime-info/. The latter two are provided by the package shared-mime-info, which I believe was installed on my system by default.