15

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)?

Sorean
  • 741
  • 1
  • 5
  • 13
Martin Thoma
  • 3,384
  • 9
  • 31
  • 65

3 Answers3

14

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

techraf
  • 4,852
  • 11
  • 24
  • 40
elmanu
  • 141
  • 1
  • 3
  • This solved my problem in Manjaro linux. I had to use `pcmanfm.desktop` in place of `caja.desktop` – crypdick Sep 02 '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 01 '20 at 01:41
14

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)
Martin Thoma
  • 3,384
  • 9
  • 31
  • 65
2

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.

James Antony
  • 131
  • 2