help: dbus - unmounting from the command line

Michael Torrie torriem at chem.byu.edu
Mon Feb 12 21:28:29 MST 2007


Since umount retorts that I have to be root to unmount a device these
days, I thought I'd try using dbus to unmount a USB device from the
command line.  Here is the approximate command I found:

dbus-send --system --print-reply --dest=org.freedesktop.Hal <udi-path>  org.freedesktop.Hal.Device.Volume.Unmount array:string:

where udi-path can be found by running lshal and looking for the device.
In my case it is:

/org/freedesktop/Hal/devices/storage_serial_COWON_iAUDIO_6_3336303131304C39CCC9CFCECECFB3C6

So when I run the command, I get and error:

Error org.freedesktop.DBus.Error.UnknownMethod: Method "Unmount" with
signature "as" on interface "org.freedesktop.Hal.Device.Volume" doesn't
exist

The odd thing is that if I run hal-device-manager (part of the FC6
hal-gnome package), and browse to the device and down to the volume I
see that the org.freedesktop.Hal.Device.Volume interface definitely
*does* have an "Unmount" method with a signature "as."

Is anyone on the list a HAL and dbus guru?  dbus and hal are cool
technologies but they are complicating my life a bit.  Maybe if people
on various distros could try the dbus-send command with their own usb
devices and let me know if it works, that would be good too.

thanks,
Michael






More information about the PLUG mailing list