How to set up Dolphin as default file manager?

I've recently came back to Ubuntu from Kubuntu, but I really like Dolphin. Is there any way how to set it up as default file manager?


To view the current default for opening directories:

xdg-mime query default inode/directory

To set Dolphin as default:

xdg-mime default org.kde.dolphin.desktop inode/directory

To set Thunar as default:

xdg-mime default thunar.desktop inode/directory

Run either on the terminal as regular user. If you want to set the default to another file manager, install the file manager, and find the correct .desktop file by searching in /usr/applications/ on the command-line.


Related files:

  • /usr/share/applications/defaults.list system-wide defaults
  • $HOME/.local/share/applications/mimeapps.list
  • $HOME/.config/mimeapps.list where xdg-mime saves configuration

Sources:

  • http://www.fandigital.com/2013/01/set-nemo-default-file-manager-ubuntu.html
  • https://wiki.archlinux.org/index.php/Default_Applications
  • http://packages.debian.org/sid/ia64/dolphin/filelist

Steps:

  1. Open a terminal, e.g. using Ctrl+Alt+T

  2. Install exo-utils by running the following command in the terminal:

    sudo apt-get install exo-utils
    
  3. Run the following command in the terminal:

    exo-preferred-applications
    
  4. In the window that opens, click on Utilities

  5. On the File Manager section, click the drop-down menu arrow + Other...

  6. Find /usr/share/applications directory

  7. Adjust to show all files and select dolphin.desktop (wherever you find it)

  8. Click close