Changing default applications, for developers
When not using those uber-featured desktop environments (such as KDE or Gnome) out there, it can sometimes be challenging to find a simple, text-based way of configuring things. For example, I am currently writing a GTK2 program, which uses the method
gtk_show_uri to open files using default programs: on the computer I am using at work, this results in opening Acrobat Reader over an XDMCP connection, which is really distasteful. Even using GNOME’s control center, there does not seem to be a way to change that. What should I look at?
There does not seem to be an official XDG standard for defining preferred applications, but standard environments (in my case, the culprit is the GIO library) use the following mechanism: look for a
mimeapps.list file in the XDG directories. It should contain user preferences, for example
It specifies preferred or unpreferred applications to be used with a given MIME type. The (system) default choices are stored in a
defaults.list file, which can be found at
/usr/share/applications/defaults.list for example.
Thus, goodbye bloated Acrobat Reader.
Entry filed under: sysadmin.