What about ability to specify a way of service/application activation by dbus?

Simon McVittie simon.mcvittie at collabora.co.uk
Tue Mar 5 03:08:15 PST 2013


On 05/03/13 10:39, Simon McVittie wrote:
> On 05/03/13 08:16, Nikita Zlobin wrote:
>> In qdbusviewer i can browse its tree, but on attempt
>> to activate it, unlike other functions of same service it gives error
>> "Unable to find method", verbose: "Unable to find method
>> UpdateActivationEnvironment on path / in interface
>> org.freedesktop.DBus".
> 
> The dbus-daemon's methods are all at "/org/freedesktop/DBus" - use that
> instead of "/".

Sorry, no, that was wrong. The dbus-daemon's methods can currently be
called via any object path, although /org/freedesktop/DBus is recommended.

I don't know where that error message is coming from - it's not
generated by libdbus, and is misleading. Are you perhaps calling the
method with the wrong arguments? It takes one argument of type a{ss}
(map/dictionary with string keys and string values).

I don't think it's possible to call UpdateActivationEnvironment via
dbus-send, but it can be accessed with, for instance, gdbus:

    gdbus call --session --dest org.freedesktop.DBus \
        --object-path /org/freedesktop/DBus \
        --method org.freedesktop.DBus.UpdateActivationEnvironment \
        '@a{ss} {"foo": "bar"}'

or dbus-python:

    python -c "import dbus;
dbus.SessionBus().call_blocking('org.freedesktop.DBus', '/',
'org.freedesktop.DBus', 'UpdateActivationEnvironment', 'a{ss}', ({
'FOO': 'BAR' },))"

(and hopefully those illustrate how you'd call it in your preferred
language).

Regards,
    S


More information about the dbus mailing list