Recently, I ran into an issue where I’d open my file manager with Start + E and to my surprise, it launches Visual Studio Code instead of Nautilus. After doing some research, I found a solution to this problem.

The problem has to do with Visual Studio taking precedence in the inode/directory. If you’re experiencing the same problem, run this command to see what your output is.

cat /usr/share/applications/mimeinfo.cache | grep inode/directory

To know that the problem is VS Code, if your output is showing “visual-studio-code.desktop” or “code.desktop” at the beginning then the problem has been identified.

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

The Solution

To fix this problem, edit the “mimeapps.list” file located in ~/.config/mimeapps.list – I’ve used vim but you can use whatever text editor you like. This tutorial is specific to GNOME Files (Nautilus) but if you’re using Nemo, Dolphin, Thunar, etc. the value you paste will be different i.e. not “org.gnome.Nautilus.desktop”

Simply add this line of code under [Default Applications]

inode/directory=org.gnome.Nautilus.desktop

It should look something like this:

It should look something like the highlighted text. You can paste it anywhere as long as it is under [Default Applications].

Once done, save the file and it should take effect immediately.