How to hide disk partitions in the PCmanFM left sidebar

I have both Linux and OpenBSD systems on my laptop.

When I open PCManFM file manager in Linux, the left sidebar shows me a list of OpenBSD UFS partitions.

PCManFM UFS partitions

I do not want to see them while working in Linux environment. Also I did not find the way how to hide those non-linux partitions via PCManFM preferences.

So I’ve hidden them using udev rules.

First of all, I have found the list of the block devices used by OpenBSD.

blkid

In my case, the partitions from /dev/sda4 to /dev/sda14 are used by OpenBSD:

/dev/mapper/sda2_crypt: UUID="6a2d575c-8d64-4965-b6f2-9e34f7686955" TYPE="ext4"
/dev/sda1: UUID="54bde5c4-bcf0-4722-9339-ddaf26a63694" TYPE="ext2" PARTUUID="0ea39ee4-01"
/dev/sda2: UUID="388bd55f-d03e-4185-9644-564a9a76ba7a" TYPE="crypto_LUKS" PARTUUID="0ea39ee4-02"
/dev/sda4: UUID="5bca0c6db016407d" TYPE="ufs" PARTUUID="0ea39ee4-04"
/dev/sda5: UUID="5bca0c6db016407d" TYPE="ufs"
/dev/sda7: UUID="5bca0c6e61644056" TYPE="ufs"
/dev/sda8: UUID="5bca0c708333b61d" TYPE="ufs"
/dev/sda9: UUID="5bca0c6e35bc6c94" TYPE="ufs"
/dev/sda10: UUID="5bca0c6e3bc034b4" TYPE="ufs"
/dev/sda11: UUID="5bca0c6e10107f9d" TYPE="ufs"
/dev/sda12: UUID="5bca0c6f874eee1a" TYPE="ufs"
/dev/sda13: UUID="5bca0c6e44de31b4" TYPE="ufs"
/dev/sda14: UUID="5bca0c6d2b897f18" TYPE="ufs"

I’ve created the udev rule and put it to /etc/udev/rules.d/90-hide-ufs-partitions.rules

KERNEL=="sda[4-9]", ENV{UDISKS_IGNORE}="1"
KERNEL=="sda1[0-4]", ENV{UDISKS_IGNORE}="1"

and run:

sudo udevadm trigger

to let them take effect.

PCManFM without UFS partitions

From the udevadm man page:

udevadm trigger [options] [devpath|file...]
       Request device events from the kernel. Primarily used to replay events at system coldplug time.