Changing File Associations in GNOME
I’ve been having some file association troubles in GNOME for a while: pdfs open by default in Acrobat Reader, which I don’t like to use except on pdfs that don’t open in faster loading programs, and firefox tries to open media files in players that I would rather it didn’t (like it tries to open Shoutcast playlists in Totem instead of xine, which I prefer).
After about an hour of experimentation, I have a vague idea of what to mess with to effect changes– I managed to fix both of the above annoyances, but not with any particular strategy. I found two methods.
First, you can either right-click on a file of the appropriate type and then use the Properties->Open With option to change the default opener. Problems with this method: it relies on the GUI, not efficient if you want to change more than one file type association at a time, etc. But it’s clear and needs no documentation.
The other method is to fiddle around with
- /usr/share/gnome/applications/defaults.list — given a MIME-type, gnome uses to determine what application to open a file with
- /usr/share/applications/*.desktop — all the gnome applications you can refer to in the defaults.list
- /usr/share/application-registry — not sure what this is for; maybe among other things controls the list of stuff that shows up in the Properties->Open With list
- /usr/share/mime-info/* — *.mime files define mappings between file extensions and mime-types, *.keys files have more descriptive info on mime-types
There are supposed to be user-level equivalents of some of these files that let you edit your file associations without being root, but I didn’t look into that, since I have root access on my system
Maybe if I ever run into trouble with the school’s setup.
Next to tackle on my list of why-the-hell-is-this-so-hard-in-GNOME: how does the menu system work? I’d like to move stuff around, delete some entries, add some, etc.
Possibly relevant posts:
- Revidivus (5/17/2003)
- Installing TeTeX latex packages (2/28/2005)
- What is Dell doing? (7/15/2007)