Re: How to hide on desktop unmounted partitions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Le 26/07/2015 19:54, François Patte a écrit :
> 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....

So! I answer to myself... This can be usefull for people who have
several systems installed and who use xfce (I don't know if the same
problem occurs for kde or gnome): icons of partitions of other system
show on the desktop.

Create a file (98-local.rules for instance) in /etc/udev/rules.d with:

ENV{ID_FS_UUID}=="17e0b155-4d77-4769-b568-723329c5f656", \
ENV{UDISKS_IGNORE}="1"

for each partition you want to hide.

You can find the right syntax, ENV{ID_FS_UUID} for instance, with the
command:

udevadm info /dev/md2

After reboot, icons do not show on the desktop.


- -- 
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

iEYEARECAAYFAlW19UYACgkQdE6C2dhV2JUrKACgj8XmF3ManpG9cVVtDC819C08
diQAnjO2B7PbgaXyX915DhenTbiwMm+U
=G7tl
-----END PGP SIGNATURE-----
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux