Article 4VASQ How to remove useless 'external drive'-icon in xfce?

How to remove useless 'external drive'-icon in xfce?

by
brobr
from LinuxQuestions.org on (#4VASQ)
Problem in short:
# An encrypted (LUKS+LVM) disk in DVD-to-HDD ('external'(?)) caddy,
# gets fstab mounted under /home/working/data during boot
# but still shows up as 'N GB Encrypted' icon on the desktop.
# How to get rid of that icon?

Hi, at the moment my laptop (running current) has
/ on an NVMe card,
the hard-disc slot occupied by a drive for doing stuff and
another hard drive in a caddy instead of the DVD drive, for data.

The two hard drives are encrypted via LUKS-LVM and mount as expected after unlocking them on boot, the first under /home/working, the second under /home/working/data via entries in /etc/fstab. All is nicely accessible via Thunar on Xfce.

A third, backup drive is also set up with LUKS-LVM, and I mount that via a script (to unlock the drive and activate the volume groups) to its folder via /etc/fstab.

There is a snag I wonder whether that is curable: the 2nd hard drive (that replaces the DVD-drive) shows up as a grayed-out icon on the desktop and in Thunar. This also happens when the external backup-drive is plugged in. But I would like not to see those icons.

Maybe this is expected behavior, being 'external' drives, but because the icons bring up screens that do not work/help to mount or remove the drives (in one case not needed as that happened during boot, and the other is done via a script) I want them gone. (A similar scenario as when encrypted folders get mounted via encfs / unmounted via fusermount -u from the command line, the icon that is presented for the encrypted volume is misleading because of its associated mount options)

Turning 'automount' XFCE settings for 'external drives' off, makes no difference for the appearance of these icons.

DuckDuckGoing brought me some advice for using a udev rule to remove these disks from sight but I cannot get this to work (I used the backup drive for testing this).

This was the route:
https://forum.xfce.org/viewtopic.php?id=13319
https://gitlab.gnome.org/GNOME/gvfs/...t-is-shown.txt

This gave me the disk-ids:
Code:udisksctl info -b /dev/sdxI had the following lines in /etc/udev/rules.d/40-hidedrive.rules directly based on the udev examples given in the gitlab.gnome page at the bottom:

Quote:
# Make sure this specific hard disk does not appear in the user interface

ENV{ID_SERIAL}=="WDC_WD40EZRZ-22GXXBX_WD-WCC7K3LDXJX5", ENV{UDISKS_IGNORE}="1"
or - to change icon-title -

Quote:
ENV{ID_SERIAL}=="WDC_WD40EZRZ-22GXXBX_WD-WCC7K3LDXJX5", ENV{UDISKS_ICON_NAME}="DATA"
and ran

Code:udevadm control --reload-rules && udevadm triggerbefore plugging the above drive in but still everything happened as if no rule had been set to prevent this.

What am I missing? Any ideas how this could be accomplished?latest?d=yIl2AUoC8zA latest?i=H0YGGAWgtMM:0jeb6x0Zios:F7zBnMy latest?i=H0YGGAWgtMM:0jeb6x0Zios:V_sGLiP latest?d=qj6IDK7rITs latest?i=H0YGGAWgtMM:0jeb6x0Zios:gIN9vFwH0YGGAWgtMM
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments