How to change the default opening of folders by vscode on Arch?

125 views Asked by At

Whether on the desktop, the application dock, or even with search, gnome opens folders directly to vs-code. I would like it to open them for me with the default gnome file application. And strangely I don't have the problem when I try to open a folder from File Explorer.

Thank you for your help.

I did some manipulations a while ago but I don't remember which ones. I would like to be able to open my folders with File Explorer.

2

There are 2 answers

0
Raph0603 On BEST ANSWER

Modify the appropriate line in /usr/share/applications/mimeinfo.cache, switching the order of code and nautilus.

From:

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

To:

inode/directory=org.gnome.Nautilus.desktop;code.desktop;
0
Julian On

The manual change in the mimeinfo.cache file from @Raph0603 were overwritten when i restarted my computer. If you want to make the change permanently you can use the following command:

gio mime inode/directory org.gnome.Nautilus.desktop

Source