known·good

Notes / chromiumxdgmimebaobablxqtarch

Chromium "Show in folder" fails with '"." is not a valid folder' (opens Baobab)

· by shaun, written up with Claude

Clicking the folder icon in Chromium's downloads panel gave '"." is not a valid folder'. Baobab (GNOME Disk Usage Analyzer) was the default handler for inode/directory, so xdg-open launched it. Making a file manager the default in ~/.config/mimeapps.list fixed it.

Tested onArch Linux; Chromium; LXQt desktop session (started via Chrome Remote Desktop); Baobab and pcmanfm-qt installed

Symptoms #

In Chromium's downloads panel, clicking the folder icon next to a downloaded file ("Show in folder") did not open a file manager. Instead this error appeared:

text"." is not a valid folder

Root cause #

On Linux, Chromium hands "show in folder" to xdg-open, which picks the default application for the MIME type inode/directory.

Baobab (GNOME Disk Usage Analyzer) declares that MIME type in its desktop file, /usr/share/applications/org.gnome.baobab.desktop:

iniMimeType=inode/directory;

With no user-level default set, Baobab won:

text$ xdg-mime query default inode/directory
org.gnome.baobab.desktop

So xdg-open launched Baobab, which expects a folder to scan, not to browse, and rejected the "." argument with the error above.

This happened in an LXQt session. Our guess (not tested elsewhere) is that it is most likely on non-GNOME desktops, where nothing else sets a user default for directories, so Baobab's system-wide claim is the one that gets picked.

Fix #

Make your file manager the user-level default for inode/directory in ~/.config/mimeapps.list. With pcmanfm-qt (LXQt's file manager):

ini[Default Applications]
inode/directory=pcmanfm-qt.desktop;

[Added Associations]
inode/directory=pcmanfm-qt.desktop;

Or with xdg-mime, which writes the [Default Applications] entry for you:

bashxdg-mime default pcmanfm-qt.desktop inode/directory

Use the desktop file of whatever file manager you have (thunar.desktop, org.gnome.Nautilus.desktop, pcmanfm.desktop, …).

Verify:

text$ xdg-mime query default inode/directory
pcmanfm-qt.desktop

No restart was needed; the next "Show in folder" click opened the file manager.

The fix used on the affected machine was the mimeapps.list edit; the xdg-mime default one-liner is the standard equivalent but was not the command actually run.