Reset "open containing folder" behaviour

gnome

#1

Yesterday, I played around with /usr/share/applications/visual-studio-code.desktop (installed from AUR) and added [Desktop Action new-window]. Now even after I revert the file back to its original, whenever I do “open containing folder” like command, a new vscode windows will shows up. Anyone know how I can reset this back to Nautilus.


#2

I don’t know if Gnome has a graphical way of changing this, but you should be able to do it manually in /home/[username]/.local/share/applications/mimeinfo.cache by changing the order of desktop files in the “inode/directory=” line.

If that doesn’t work, you could try editing the same line in /usr/share/applications/mimeinfo.cache (but that gets overwritten occasionally). You could remove “MimeType=inode/directory;” from the visual studio code desktop file.


#3

File ~/.local/share/applications/mimeinfo.cache does not exists. I also checked /usr/share/applications/mimeinfo.cache but it is set to Nautilus already inode/directory=org.gnome.Nautilus.desktop;.


#4

You could also check /home/[username]/.local/share/applications/mimeapps.list and /home/[username]/.config/mimeapps.list to see if there’s an inode/directory entry there for visual-studio-code.desktop.


#5

Found it in ~/.config/mimeapps.list thank you :grinning:


#6

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.