hal mount/unmount flash drive using dbus-send

Andrey Borzenkov arvidjaar at mail.ru
Tue Mar 3 11:59:20 PST 2009


On 3 марта 2009 11:44:44 Григорий wrote:
> Good day,
> my goal is to mount/unmount flash drive usng hal over dbus in some
> program, but even using "standard" dbus-send command for
> mounting/unmounting causing error message,
>
> dbus-send --system --print-reply --dest=org.freedesktop.Hal
> /org/freedesktop/Hal/devices/volume_uuid_EAEC_055A
> org.freedesktop.Hal.Device.Volume.Unmount
>
> where /org/freedesktop/Hal/devices/volume_uuid_EAEC_055A is udi of my
> usb flash, exactly volume not device.
>
> error
>
> Error org.freedesktop.DBus.Error.UnknownMethod: Method "Unmount" with
> signature "" on interface "org.freedesktop.Hal.Device.Volume" doesn't
> exist
>
> I tried under user, under root, on debian, ubuntu.
>
> The question is what point i've missed, or how to enable more debug
> output from hal or dbus?
>

It already told you everything you need to know.

> (string list) org.freedesktop.Hal.Device.Volume.method_names =
> {'Mount', 'Unmount', 'Eject'} (string list)
> org.freedesktop.Hal.Device.Volume.method_signatures = {'ssas', 'as',
> 'as'} (string list)

You have to pass required parameters (even if they are empty). Umount 
expects array of strings.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freedesktop.org/archives/hal/attachments/20090303/d2c36abe/attachment.pgp 


More information about the hal mailing list