This is documented (at least for
The gvfs-udisks2-volume-monitor process is responsible for the disks,
media, mounts and fstab entries shown in the desktop user interface.
A device is either mounted (in which case its directory is known) or
it's not. If the device is not mounted, then its directory is known
only if it's referenced in the /etc/fstab file.
Further down comes the explanation:
If the directory for a device is known and outside /media, $HOME
(typically /home/foo) or /run/media/$USER then the device is not shown
in the user interface. Additionally, if any of component directories
in its directory starts with a dot ("."), the device is not shown
either. This policy may be overriden by use of the options x-gvfs-show
To sum up:
Partitions listed in
/etc/fstab would (by default) only show up if they're mounted under
/run/media/$USER. If you want a partition to be automatically mounted at system startup and also listed in the file manager sidebar, the easiest way is to mount it via
/etc/fstab under one of those three locations.
If you want the partition to be mounted under a different directory (e.g.
/mnt) and still be shown in the sidebar, you can override the default behaviour by adding
x-gvfs-show to your mount options in
UUID=5a1615ca-cffd3124917a /mnt/storage ext4 rw,noatime,discard,x-gvfs-show 0 2
Partitions not listed in
/etc/fstab are handled by
udisks2 and will be mounted under
/media/VolumeName depending on the value of
UDISKS_FILESYSTEM_SHARED1 hence they will be shown under
Devices in the sidebar. However, they are not automatically mounted. A user could automatically mount them at session startup with
udisksctl, e.g. adding:
udisksctl mount -b /dev/sdb2 -t ext4
to the session startup scripts.
If set to 1, the filesystem on the device will be mounted in a shared directory e.g. /media/VolumeName)
instead of a private directory (e.g. /run/media/$USER/VolumeName) when the Filesystem.Mount() method is handled.