Select and hide unmounted drive icons from Xfce desktop

Since I have other partitions on my HDD that I do not mount in my Archlinux, I did not want to see these drive icons on the desktop. There are few solutions to this, simple one is to disable all of these icons via Settings > Desktop > Icons and uncheck Removable devices, but this will also hide your USB flash disks when you insert them. I just wanted to selectively hide some of my HDD partitions from the desktop. Solution is to create this file, and to reboot your system. Maybe there is some systemctl trick on how to do it without restart but this works just as well.

cat /etc/udev/rules.d/10-local.rules
KERNEL=="sda5",ENV{UDISKS_IGNORE}="1"
KERNEL=="sda6",ENV{UDISKS_IGNORE}="1"
KERNEL=="sda7",ENV{UDISKS_IGNORE}="1"

Where sda5, sda6 and sda7 are partitions you want to hide from desktop.

One Reply to “Select and hide unmounted drive icons from Xfce desktop”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.