What replaces this part of HAL?
Martin Pitt
martin.pitt at ubuntu.com
Thu Feb 24 06:51:49 PST 2011
Hello Tom,
Tom Horsley [2011-02-24 8:43 -0500]:
> When my USB mouse is plugged/unplugged, I get DBUS messages
> which allow me to re-run my xinput settings for the mouse
> to properly configure the buttons and acceleration.
You should instead listen to the uevent which adds (or changes) the
/dev/input/eventXX device node. That's what hal catches as well, and
it just translates that into a D-BUS signal.
> When my PTP cameras are plugged/unplugged, I also get DBUS
> messages (with the HAL udi string), so I can do hal queries
> to dig up properties like the USB bus and device numbers
> so I can open the camera with libgphoto2.
Again, these will create a new USB device (/dev/bus/usb/..) with an
ID_GPHOTO2 property.
> So that's my question: If HAL really is going away, what
> is supposed to replace this kind of notification mechanism
> for newly plugged devices?
It's all udev with uevents (which is also HAL's main input source,
apart from some CD-ROM polling which went into udisks).
Also, "is going away" is a bit of an understatement, it's really quite
dead. GNOME switched over a year ago, KDE and XFCE finished the
transition a couple of months back (see [1]). The major distros don't
even install it by default any more, or at least switched hal to D-BUS
activation so that it doesn't run all the time and cost extra boot
time/CPU/battery power, and just gets started for the odd old program.
Martin
[1] https://wiki.ubuntu.com/Halsectomy
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
More information about the hal
mailing list