This blog post talks about how to change the default application to handle a file type in Nautilus for individual file types (right-click on the file, "open with", and select the new default application), but is there a way to list all current associations and configure them in one go, similar to the Windows "folder options | file types" tab? There seem to be a bunch of default associations that I want to change (all various image files are being opened in IceWeasel instead of the image viewer), and I don't want to have to change them one-by-one in the file manager. If there's no GUI for doing this, then where does Nautilus store its file associations? Can I edit them with a text editor?
3 Answers
On my system (Debian Jessie) I found all the normal methods of specifying a default application wouldn't override the one hiding in ~/.config/mimeapps.list.
Thunar insisted on opening a particular file with gedit even after I told it to make the correct application the default. When I removed the setting from ~/.config/mimeapps.list, it started working properly again.
- 31,183
- 18
- 69
- 104
- 131
- 1
- 2
All of your file associations are stored in $HOME/.local/share/applications/mimeapps.list. Some of them are not in your personal mimeapps.list file. There's a system wide file with all the default associations in /usr/share/applications/mimeapps.list and/or in /usr/share/applications/defaults.list.
For more info check out Specifications/mime-actions-spec
Edit:
In Fedora 14 I have these settings files:
/var/lib/gdm/.local/share/applications/mimeapps.list
/usr/share/applications/defaults.list
/usr/local/share/applications/defaults.list
$HOME/.local/share/applications/defaults.list
$HOME/.local/share/applications/mimeapps.list
- 1,228
- 3
- 17
- 38
-
Thanks, that helps a little in that I do indeed have a `$HOME/.local/share/applications/mimeapps.list` with a few added associations, however I do not have any `.list` files in `/usr/share/applications/` and yet there are evidently a bunch of other default associations stored somewhere. Do you know where else they could be stored? – Jez Jun 22 '12 at 14:31
-
1More strangeness. I've looked through all the `defaults.list` and `mimeapps.list` files on the system, and in two of them, JPEG images are actually configured to run with `eog.desktop` which should open them in the image viewer and not Iceweasel, and yet Nautilus still opens JPEG images in Iceweasel. How could it be getting this file association? – Jez Jun 22 '12 at 15:04
-
That is strange. I have this: `$ cat ./.local/share/applications/mimeapps.list | grep jpeg image/jpeg=gthumb.desktop;gnome-eog.desktop;` – slybloty Jun 22 '12 at 15:47
-
your link is broken. – chovy Dec 22 '18 at 01:31
I am using Ubuntu 13.10.
The file you need to edit is /etc/gnome/defaults.list.
- 1
-
I am using Ubuntu 20.04. That file exists, but it applies to all users. You can change the associations in the GNOEe GUI and these changes end up in ~/.config/mimeapps.list so that's what I edit. – reinierpost Jun 07 '23 at 08:38