dbus-send use?

Johannes Felten johannesfelten at googlemail.com
Thu Jun 10 00:24:22 PDT 2010


Hi all,

it should work this way:

dbus-send --system --print-reply --dest=org.freedesktop.Hal
/org/freedesktop/Hal/device/computer_backlight
org.freedesktop.Hal.Device.LaptopPanel.GetBrightness

If you are having Qt around, ou could also try 'qdbus --system' .
Simply qdbus lists all services, 'qdbus --system org.freedesktop.Hal'
all adaptors of Hal and so on.
Service means org.freedesktop.Hal in this case, path would be
/org/freedesktop/Hal/device/computer_backlight, interface
org.freedesktop.Hal.Device.LaptopPanel and method obviously
GetBrightness

Greetz,
Johannes


2010/6/10 ttlee1984 <ttlee1984 at gmail.com>:
> Thanks for the advice. I will check it. But may I say it is a little bit
> different from what I wanted to know? My original question is, if I already
> know the object path (for example
> /org/freedesktop/Hal/device/computer_backlight), the interface
> (org.freedesktop.Hal.Device.LaptopPanel),  and the method
> (GetBrightness(void)), how should I inquiry this mehtod by dbus-send? Or
> isn't it enough to know just this three pieces of information call it?
>
> Because I am also using Qt binding, and for example there is a API
>
> QDBusMessage QDBusMessage::createMethodCall ( const QString & service, const
> QString & path, const QString & interface, const QString & method )
>
> But I can't figure out what is this argument "service". There is no
> corresponding concept in the DBus specification. Or as I asked, does it mean
> the well-known connection name?
>
> Thanks for the help!
>
> 2010/6/10 danny <tornadory at 163.com>
>>
>> Perhaps you could try the "d-feet" tool. It could list all of the running
>> dbus services.
>>
>> For others, you should check the documents for specific program.
>>
>> --
>>  Best Regards,
>>
>>
>> 在2010-06-10 05:18:13,ttlee1984 <ttlee1984 at gmail.com> 写道:
>>
>> Hi all,
>>
>> I have a question in the use of dbus-send. It requires the --dest
>> argument. But what is it? In the man page it says it is the name of the
>> connection, I assume it refers to what is called "well-known bus name" in
>> the specification. But how should I use it or even know this name? For
>> example, I want to check the brightness of the computer. I now know the
>> object path ,which is /org/freedesktop/Hal/device/computer_backlight   The
>> interface is org.freedesktop.Hal.Device.LaptopPanel  and the method is
>> GetBrightness(void). So how shoud I use dbus-send to call this method? I
>> have tried several combinations but did not get any luck. Any help will be
>> appreciated.
>>
>> Cheers
>>
>>
>> ________________________________
>> 网易为中小企业免费提供企业邮箱(自主域名)
>
> _______________________________________________
> dbus mailing list
> dbus at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dbus
>
>


More information about the dbus mailing list