BHK Code Vault

When Nemo isn't default filemanager

You may find that an application that is not a file manager, Audacious or Visual Studio Code for example, is set as the default application for opening directories — an application that specifies that it can handle the inode/directory MIME type in its desktop entry can become the default. You can query the default application for opening directories with the following command:

$ xdg-mime query default inode/directory

To ensure that directories are opened in the file manager, run the following command:

$ xdg-mime default my_file_manager.desktop inode/directory

where my_file_manager.desktop is the desktop entry for your file manager — org.gnome.Nautilus.desktop for example.

Tip: If you want the change to be system-wide, run the command above as root or create/edit the following file:

/usr/share/applications/mimeapps.list
[Default Applications]
inode/directory=my_file_manager.desktop

Normally the default should be nemo.desktop but it can be other file managers as well. Visual Code Editor is known to reset this, and in my system apparantly Kitty was the culprit last time.

#arch, #linux