Ubuntu – How to set Thunar as the default file manager in 15.04

15.04default-programsthunar

I would like to set Thunar as my default file manager in 15.04. Now, I realize that this question is very similar to How to set Thunar as a default file manager?, but I have tried Kevin's answer, why I even tried rebooting after I completed his suggestion but still Nautilus is used as my default File Manager. I even tried the shell script, Midnight Commander and Manual solutions recommended on the Community Help Wiki. Not one changed Thunar to my default file manager.

I was curious as to whether exo could change my default file manager at all, say to dolphin (as I also saw this question and its answer) but that also failed. Something tells me that this issue affects not just me but other users too, specifically 15.04 users, as Ubuntuuser reported in the comments that he could not set dolphin as his default file manager via exo either.

If you would like to know how I am checking whether these file managers are set to default, well I open folders on my desktop by double-clicking them to see whether they're opened in these alternative file managers or not and as a second test I also try to save files in Chrome to see whether the file manager window that pops up is the one I want.

If relevant I am running Unity as my Desktop Environment.

Best Answer

None of the other solutions worked for me. It turns out my desktop manager uses gvfs and not xdg. Thus I had to configure the mimetype for gvfs.

See what's currently set:

gvfs-mime --query inode/directory

Set it to Thunar:

gvfs-mime --set inode/directory Thunar.desktop

And test it:

gvfs-open $HOME