When I click "show in folder" Chrome opened the folder in a new tab. How can I fix this such that Chrome opens the folder with my standard file explorer (caja)?


Just execute the following lines and the problem will be fixed. No restart (neither of chrome, nor of anything else) is needed:

$ sudo apt-get install libfile-mimeinfo-perl
$ mimeopen -d /home/moose/Documents
Please choose a default application for files of type inode/directory

1) Caja  (caja-folder-handler)
2) Other...

use application #1
Opening "/home/moose/Documents" with Caja  (inode/directory)

I had the same problem after uninstalling pcmanfm and changing it for Thunar.

No need to install anything. Chromium/Chrome manages this function through xdg-open, and you have to modify it.

Check which is the default file manager in xdg-open:

$ xdg-mime query default inode/directory

It should give an unwanted one or one that is no longer installed.

Then set the desired default file manager in xdg-open. For caja it should be:

$ xdg-mime default caja.desktop inode/directory

or something really similar.
It worked immediately for me. I learnt it from: https://wiki.archlinux.org/index.php/xdg-open

  • This solved my problem in Manjaro linux. I had to use pcmanfm.desktop in place of caja.desktop – crypdick Sep 2 '17 at 16:58
  • This also solved a problem where I had unintentially made sublimetext 3 my file manager: xdg-mime query default inode/directory gave me sublime_text.desktop, and xdg-mime default nautilus.desktop inode/directory changed it back. – outis nihil May 24 '18 at 13:23
  • I think this answer should be marked as solution as it's more general and not distributive-specific. – Boris Tsema Sep 10 '18 at 13:45
  • does the new setting "stick" after reboot? – nmz787 Nov 1 '20 at 1:41

For me, further to @elmanu's answer xdg-mime default caja.desktop inode/directory, it was running

update-desktop-database ~/.local/share/applications/

which finally updated the default application.

After this, running xdg-mime query default inode/directory now showed the new default application.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.