Resetting Default File Manager in Gnome

Ever since I updated to GNOME 3.14, I was facing some problems with the default application for folders. I am using more or less vanilla GNOME, so the default application for folders should be Nautilus. Whenever I open a folder from Nautilus, there are no problems. However, when I open a folder location from another application, say Skype after receiving a file from a friend or from file-roller (Archive Manager) after extracting files, it was getting opened in some other applications (e.g. Anjuta, Audacious etc). This is partly because these applications set themselves capable of opening a folder, I guess, for importing files. You might be able to get rid of this feature for each of these applications, but this was not an ideal solution.

As far as I know, there are two standard options to set default applications in GNOME.

  1. When you browse using Nautilus, right click on a file and go to properties. In the properties dialog window, select the tab “Open With”. In the list of applications shown there select the application you want to use and click on “Set as default”. In future the file (and other files of the same type) will be opened with the new default application.
  2. Open the Settings application and select “Details”. In that you have the option to set “Default Applications” on the left hand side list. When this is selected on the right hand side pane, you can set the default applications for a few generic types (Web, Mail, Calendar, Music, Video and Photos).

Both the above methods cannot be used to set the default application for a directory. Although one may think that it should work in the first option, you don’t get the tab “Open With”, when you access the properties of a directory. So no luck here.

Finally I managed to do this by editing “~/.config/mimeapps.list”. Open this file in your favourite text editor and add/edit the which sets “inode/directory”. To set Nautilus as the default application to for a directory, in the “[Default Applications]” category, add

inode/directory=org.gnome.Nautilus.desktop

and in the “[Added Associations]” category, add

inode/directory=org.gnome.Nautilus.desktop;

An alternate approach is by entering the following in terminal. When you do this, behind the scene, the above steps will be carried out. (source: Arch Wiki)

xdg-mime default org.gnome.Nautilus.desktop inode/directory

3 Comments

  1. “xdg-mime default org.gnome.Nautilus.desktop inode/directory” in terminal worked very well to me here in OpenSUSE 13.2… thanks a lot!!

  2. Gratitude. Perfect.

    For me the file was ~/.local/share/applications/mimeapps.list,
    and vlc had somehow become listed as the inode/directory handler.

    It is very nice to have Nautilus again when clicking on a folder icon.

    Very helpful.

Leave a Comment

Your email address will not be published. Required fields are marked *