Ubuntu – Can not Change Default File Manager of Ubuntu Mate 18.04

18.04defaultdefault-programsfilemanagerubuntu-mate

I installed Nemo using

sudo add-apt-repository ppa:webupd8team/nemo3
sudo apt update
sudo apt install nemo

Then I went to Preferred Application -> System -> File Manager -> Files

NOTE: Nemo like to call itself files

But it did not change the default file manager.

So, to double check I used my ubuntu mate bootable usb (try ubuntu). Used the same process to check if Nemo can be set to default file manager. But it is not working there either?

I would like to mention xdg-open $HOME open Nemo.

Should I change anything in /usr/share/applications/mate/ as I read somewhere that the application showed in Preferred Application are taken from this location.

If I need to change any file, what file do I need to change and what is the change?

What is the terminal solution?

Update 1

The Home and Computer icons in the Desktop is by Mate Tweak, and it created all the confusion. Mate Tweak generated Icons always open in Caja no matter what the default File Manager is.

But when I create a directory shortcut, it opens in Nemo by default.

Best Answer

xdg-open uses xdg-mime to determine the type of object to open and then searches for the default application for it.

$ xdg-mime query filetype $HOME
inode/directory

$ xdg-mime query default inode/directory
nautilus-folder-handler.desktop

You need to set default application with nemo.desktop file. You can find it in /usr/share/applications. Then

$ xdg-mime default nemo.desktop inode/directory

And try open any directory with xdg-open.