Detect CD Insert

Robby Workman rw at rlworkman.net
Mon Mar 10 07:41:43 PDT 2008


Thanh Tran wrote:
> Is it possible to use HAL to detect when a CD is
> inserted into an optical drive?  I tried to use "lshal
> --monitor" and found no messages.  I would've guessed
> the volume namespace would appear when a CD is
> inserted.  Thanks in advance for any help.


Polling should catch that.

You should see something along these lines in the process list:
   hald-addon-storage: polling /dev/hdc (every 2 sec)
[adjust for actual device name]

-RW


More information about the hal mailing list