Beginner Hal question(s)

Madison Kelly linux at
Fri Mar 17 20:07:04 PST 2006

Hi all,

  I had asked this question on the DBus mailing list. It was suggested
though that you Hal guys and gals might be a better place to ask.

  I have decided to re-write a backup program I had been working on for
a couple of years now from the ground up. This got me looking at new
ways to do things and it looks like DBus/Hal is exactly what I want. I
have read the Net::DBus tutorials (what there is of them) and have tried
to read the other various docs I could find but I have hit something of
a road block and was hoping for some help. I write mostly in Perl but am
not adverse to learning C is there is a compelling reason to use it.

  By the way, I am not asking anyone to make what I want work, just a
little bit of a push in the right direction with perhaps a small sample
script I could play with/build on. :)

  What I am trying to do is listen for messages about:
- Disk (USB/Firewire/etc) being connected, mounted or unmounted
- Optical drives when media is ejected or inserted (and what type)
- Possibly tape drive events, but this is low priority.

  Can I use Hal to query a device? For example, when a disk is added
could I query Hal to get info like how many partitions are available,
if/where they were mounted, their total and used capacity and so on?

  Thanks muchly in advance!!


More information about the hal mailing list