[Gllug] HAL and udev

Nix nix at esperi.org.uk
Sat Aug 5 19:59:24 UTC 2006


On Fri, 04 Aug 2006, Mike Brodbelt yowled:
> I'm trying to get gnome-volume-manager to work on Debian. When I plug in
> a USB device, udev sees it and creates links under /dev/disk/*, but
> doing lshal doesn't show it up. I believe that hald should see it, and I
> have default Debian udev rules files that mention hal, but it isn't working.
> 
> Documentation on how hal operates seems almost non-existent, and it's

One out-of-date paper. But, hey, as of HAL 0.5.8 it dpeends on a new
PolicyKit component which is security-critical, contains numerous severe
bugs (like not dropping privileges when it should and ignoring its
don't- run-as-root option), is intended for sysadmins to customize, and
has absolutely no documentation.

Wonderful, isn't it :(

> config is an XML mess that is less than clear. Can anyone point me in
> the right direction to trobleshoot it....

Well, a good start is to make sure that HAL is listening on the same
socket that udev is sending on. It listens on an AF_UNIX socket in the
abstract socket namespace, so:

hades:/etc/udev/rules.d# grep hal /etc/udev/rules.d/*
/etc/udev/rules.d/30-hal.rules:RUN+="socket:/org/freedesktop/hal/udev_event"

.. i.e., udev is sending to /org/freedesktop/hal/udev_event in the abstract
namespace...

hades:/etc/udev/rules.d# netstat -ap | grep hal
[...]
unix  2      [ ]         DGRAM                    1920   695/hald            @/org/freedesktop/hal/udev_event

... and HAL is listening on that socket.

And, indeed, for me:

nix at hades 286 /home/nix% lshal | grep Samsung
[nothing]
[turn printer on]
nix at hades 287 /home/nix% lshal | grep Samsung
  info.product = 'Samsung ML-2250 Series'  (string)
  usb_device.product = 'Samsung ML-2250 Series'  (string)
  info.vendor = 'Samsung Electronics Co., Ltd'  (string)
  usb_device.vendor = 'Samsung Electronics Co., Ltd'  (string)
  usb.vendor = 'Samsung Electronics Co., Ltd'  (string)
  printer.vendor = 'Samsung'  (string)
  info.vendor = 'Samsung'  (string)

... it works.


(This is with udev 096 and HAL 0.5.8 from CVS as of 2006-07-22.)

-- 
`We're sysadmins. We deal with the inconceivable so often I can clearly 
 see the need to define levels of inconceivability.' --- Rik Steenwinkel
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list