Problem Interfacing with Hal

Danny Budik dbudik at ist-traffic.com
Fri Feb 24 15:20:38 PST 2006


Hello All,

I have been trying to write my own program in C to interface with Hal. 
When I plug in a specific USB device, I want to print a message on the 
screen.  For examples on how to do this, I've been using 
gnome-volume-manager and Ivman.  Both have a very similar structure and 
I tried to mimic it.  What I do is initialize Hal where the callbacks 
libhal_ctx_set_device_added and libhal_ctx_set_device_removed are 
called. Then I have a while loop which just waits for an event (such as 
my plugging in a device).

But it is not working right - nothing happens when I plug in a USB 
device. I know that Hal initializes correctly (with error checking) and 
the callbacks get set, but they never get called when I add a device. 
Are there any more examples that I can look at?

Just to get the obvious stuff out of the way, I have dbus v0.33, hal 
v0.5.2, running FC4 kernel 2.6.15, and I'm using KDE 3.5.

Thanks
-- 
Danny Budik
Systems Engineer
Inductive Signature Technologies, Inc.
http://www.ist-traffic.com
(865) 673-9434


More information about the hal mailing list