David Brown wrote:
> On Fri, Feb 29, 2008 at 07:20:56PM -0800, Carl Lowenstein wrote:
> 
>> When I put a blank CD-R in the drive, after several seconds an icon
>> labeled "Blank CD-R Disc" appears on the desktop.  Is there some
>> command-line way to recognize this?
> 
> I'm not sure about simple command line.  Some depends on your distribution,
> and what it's doing.  Do you have 'dbus' running.  If so, you might be able
> to get something useful out of dbus-monitor which is what will get notified
> about the insertion of the media.
> 
> If your distribution is older, then something is probably just polling for
> the device, in which case , you can also poll.
> 
> The desktop might create a file for the "Blank CD-R Disc" icon, which you
> could check for.  This might be the easiest way to do it.

Not bad!
Running
   dbus-monitor --system
gives
"""
signal sender=org.freedesktop.DBus -> dest=:1.91
path=/org/freedesktop/DBus; interface=org.freedesktop.DBus;
member=NameAcquired
   string ":1.91"
signal sender=:1.6 -> dest=(null destination)
path=/org/freedesktop/Hal/devices/storage_model_CD/DVDW_SH_S182M;
interface=org.freedesktop.Hal.Device; member=PropertyModified
   int32 1
   array [
      struct {
         string "storage.removable.media_available"
         boolean false
         boolean false
      }
   ]
signal sender=:1.6 -> dest=(null destination)
path=/org/freedesktop/Hal/Manager;
interface=org.freedesktop.Hal.Manager; member=DeviceRemoved
   string "/org/freedesktop/Hal/devices/volume_empty_cd_r"
signal sender=:1.6 -> dest=(null destination)
path=/org/freedesktop/Hal/devices/storage_model_CD/DVDW_SH_S182M;
interface=org.freedesktop.Hal.Device; member=PropertyModified
   int32 1
   array [
      struct {
         string "storage.removable.media_available"
         boolean false
         boolean false
      }
   ]
signal sender=:1.6 -> dest=(null destination)
path=/org/freedesktop/Hal/Manager;
interface=org.freedesktop.Hal.Manager; member=DeviceAdded
   string "/org/freedesktop/Hal/devices/volume_empty_cd_r"


[1]+  Stopped                 dbus-monitor --system
([EMAIL PROTECTED] ~)1014$ kill %+
"""

Neato!,
..jim


-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to