Non-removable vs removable?

Hungerburg pch13 at myzel.net
Tue Jan 18 12:59:25 CET 2011


Am 2011-01-18 08:17, schrieb Yves-Alexis Perez:
> On mar., 2011-01-18 at 08:12 +0100, Jérôme Guelfucci wrote:
>> If you manage to read French, Lionel has a howto to hide LVM snapshots
>> using UDISKS_PRESENTATION_HIDE and udev.
>>
>> http://mrpouit.free.fr/?p=626
>>
>> Even if you can't read French, I'm sure you can do something with the
>> rule example.
>
> And I'm sure if you bribe Lionel with beer promises he might do an
> english translation which would really fit on the planets he's
> syndicated on :)
>

Crude translation below, there must be a better way than matching by name?

Hiding lvm udisks

For its 4.8 release Thunar has been ported to the GIO framework. So 
unlike previous versions, now also partitions of non-removable volumes 
are shown. And also logical lvm volumes. Nothing too bad, except that 
the thunar sidebar is stuffed to the brim.

To get rid of that, one has to tell udisks to ignore chroots and 
snapshots, by using the UDISKS_PRESENTATION_HIDE variable. The preferred 
means is udev (oh joy!). It is therefore "sufficient" to create a rule 
in /etc/udev/rules.d/, e.g. 99-hide-schroot.rules, that contains:

# my volumens all have names like /dev/$vg/chroot_$release_$arch,
# so one searches for the ones starting with 'chroot'
ENV{DM_LV_NAME}=="chroot_?*", ENV{UDISKS_PRESENTATION_HIDE}:="1"
# snapshots call themselves /dev/$vg/$nomduschrootsource-$uiddusnapshot,
# in my case thats /dev/$vg/$release-$arch-sbuild-$uuid,
# so search volumes with '-sbuild-' in their name
ENV{DM_LV_NAME}=="?*-sbuild-?*", ENV{UDISKS_PRESENTATION_HIDE}:="1"

Reboot, look, look, thunar sidebar is less loaded, nice that!

-- 
peter



More information about the Xfce4-dev mailing list