How do I fix Chrome 'show in folder' to open in file explorer and not in new tab?

11,150

Solution 1

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)

Solution 2

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

Solution 3

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.

Share:
11,150

Related videos on Youtube

Martin Thoma
Author by

Martin Thoma

I also have a blog about Code, the Web and Cyberculture and a career profile on Stackoverflow. My interests are mainly machine-learning, neural-networks, data-analysis.

Updated on September 18, 2022

Comments

  • Martin Thoma
    Martin Thoma almost 2 years

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

  • crypdick
    crypdick almost 7 years
    This solved my problem in Manjaro linux. I had to use pcmanfm.desktop in place of caja.desktop
  • outis nihil
    outis nihil about 6 years
    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.
  • Boris Tsema
    Boris Tsema almost 6 years
    I think this answer should be marked as solution as it's more general and not distributive-specific.
  • nmz787
    nmz787 over 3 years
    does the new setting "stick" after reboot?
  • Robert Cutajar
    Robert Cutajar over 2 years
    Didn't work for me. xdg-mime did. I guess it depends which system you use.