Nautilus seems to be the default application to open a directory,
more precisely to open a file of type inode/directory
. Furthermore
Nautilus has the bad habit to mess with the desktop as you have
noticed. What you need to do is to tell the system what default
application to use to open a directory and chromium will obey.
In this example I use midnight commander as file manager of choice,
feel free to change it to your preferred one. First you need to
ensure that there's a .desktop
file which is required by the XDG
specification. For GUI file managers the chance is good that there
already is a suitable .desktop
file, for terminal applications
usually you have to create your own one. Check out the directory
/usr/share/applications
for existing files.
Create a file
~/.local/share/applications/midnight-commander.desktop
with the
following content:
[Desktop Entry]
Name=Midnight Commander
Exec=mc %U
Terminal=true
StartupNotify=false
Type=Application
MimeType=inode/directory
The next step is to register this application with the
inode/directory
MIME type:
xdg-mime default midnight-commander.desktop inode/directory
You can confirm a successful registration with
xdg-mime query default inode/directory
which should output midnight-commander.desktop
. Now you can click
on “Open in Folder” in chromium and a terminal should pop up with
midnight commander opened in the directory. No need to even restart
the desktop session or the browser.
If you want to use Nautilus just without having it to mess with your desktop, you need to copy and rename the corresponding .desktop
file from /usr/share/applications
and replace
nautilus %U
with
nautilus --no-desktop %U