HAL -> UDEV/PolicyKit howto question

Martin Pitt martin.pitt at ubuntu.com
Thu Sep 17 04:31:34 PDT 2009


Hello David,

David Favor [2009-09-02  7:31 -0500]:
> 
>     https://bugs.launchpad.net/ubuntu/+source/hal/+bug/421150
> 
> I have a very simple two line HAL Policy which removes an
> icon of the Ubuntu Desktop for some Windows AdWare burned
> into a CD Player ROM.

Are you sure that hal doesn't read them any more? Nothing substantial
changed in hal since 9.04. (Nobody really works on it any more)

My first guess would be that it just seems like it, since GNOME isn't
using hal at all any more. Can you check lshal whether your volume has
volume.ignore==True?

For the convenience of other readers:

 <device>
  <match key="volume.label" string="Bluebirds">
   <merge key="volume.ignore" type="bool">true</merge>
  </match>
 </device>

> Can someone glance at this HAL Policy and direct me as to
> how to implement it in current subsystems as I'm having
> challenges figuring out even what subsystems to use.

The modern counterpart would be to write a custom udev rule which sets
DKD_PRESENTATION_HIDE. Check /lib/udev/rules.d/95-devkit-disks.rules
for examples. Putting this into /etc/udev/rules.d/95-hide-bluebird.rules would be the
DK-disks equivalent of your rule:

ENV{ID_FS_LABEL}=="Bluebirds", ENV{DKD_PRESENTATION_HIDE}="1"

Martin

-- 
Martin Pitt        http://www.piware.de
Ubuntu Developer   http://www.ubuntu.com
Debian Developer   http://www.debian.org


More information about the hal mailing list