How to hide on desktop unmounted partitions

François Patte francois.patte at mi.parisdescartes.fr
Sun Jul 26 17:54:26 UTC 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bonjour,

I have on my disks some partitions which are not mounted at boot time
and they appear as icons on the desktop of every user... I want to
hide them.

Before systemd, I added some rules in udev directories
(/etc/udev/rules.d) to hide these partions:

KERNEL=="sda1", ENV{UDISKS_PRESENTATION_HIDE}="1"
KERNEL=="sda2", ENV{UDISKS_PRESENTATION_HIDE}="1"
ACTION=="add", KERNEL=="0000:00:02.0", SUBSYSTEM=="pci", RUN+="/bin/sh
- -c 'echo 1 > /sys/bus/pci/devices/0000:00:02.0/remove'"

And partitions sda1 and sda2 do not appear on desktop...

Is it possible to do the same with systemd-udevd? What is the right
syntax?

One more question: these partitions are members of raid arrays and lvm
groups, is it possible to use md2 or /dev/mapper/foo instead of sda1,
sda2....


Thank you for helping (I am very new to systemd...)

- -- 
François Patte
UFR de mathématiques et informatique
Laboratoire CNRS MAP5, UMR 8145
Université Paris Descartes
45, rue des Saints Pères
F-75270 Paris Cedex 06
Tél. +33 (0)1 8394 5849
http://www.math-info.univ-paris5.fr/~patte
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iEYEARECAAYFAlW1HtIACgkQdE6C2dhV2JVIXACgxbPjbAL7f9HO97iY1witKrza
QWkAoLzjouF+AOxTntLcryUktoVSd78o
=6SuX
-----END PGP SIGNATURE-----


More information about the users mailing list