I have quite a number of bind-mounted directories on my computer (running Ubuntu 20.04 MATE edition). Unfortunately they all showed up under "Devices" on the left sidebar of Caja file manager. I wonder if these bind-mounted "mount points" can be hidden (or if certain paths can be excluded from the list of devices shown in Caja). They become clutter and I really don't want them to show up as "devices". Because they are not.
Wirawan
That is a known bug, caused by libmount, and you can read more about it in GNOME Glib issue #1271.
Caja uses GIO which uses libmount directly and has no feature to be able to hide drives / volumes (x-gvfs-hide does not work).
You can patch Caja yourself, but you will have to rebuild the package which is just a matter of something like: saving the below patches as
.patch
files,apt source caja
,apt build-dep caja
, go inside the Caja source directory,patch -p1 < PATCHFILE.patch
,dpkg-buildpackage -rfakeroot -uc -b
, install the new.deb
package.This one will hide volumes not associated with a drive (save this as:
hide_no_drive.patch
):This one will hide mounts that have no volume (save this as:
hide_no_volume.patch
):Another thing you can try is rebuilding
glib
(which contains GIO) and modify the Meson build to use-Dlibmount=false
or-Dlibmount=disabled
. This will disable the use of libmount system-wide for everything that uses GIO also inside GTK file dialogs.