Cannot use gdbus command against same arguments of dbus-send

Emmanuele Bassi ebassi at gmail.com
Mon May 27 14:39:07 UTC 2019


On Mon, 27 May 2019 at 15:17, Germano Massullo <germano.massullo at gmail.com>
wrote:

> Hello, on Fedora GNOME Xorg session, I am using
>
>     $ dbus-send --print-reply --dest=org.gnome.Mutter.IdleMonitor
> /org/gnome/Mutter/IdleMonitor/Core
> org.gnome.Mutter.IdleMonitor.GetIdletime
>
> to retrieve the user idle time. Indeed I get message
>
>     method return time=1558965539.579835 sender=:1.19 ->
> destination=:1.97 serial=409 reply_serial=2
>        uint64 17
>
> But if I try to use gdbus command
>
>     $ gdbus call --system --dest org.gnome.Mutter.IdleMonitor
> --object-path /org/gnome/Mutter/IdleMonitor/Core --method
> org.gnome.Mutter.IdleMonitor.GetIdletime
>
>
The org.gnome.Mutter name is not on the system bus, since it's your
compositor's instance and it's running in your session.

The default for `dbus-send` is to use the session bus. The equivalent for
`gdbus` is to use the `--session` argument; you're using `--system`, which
is meant for the system bus.

For instance, this:

```
$ gdbus call --session \
> --dest org.gnome.Mutter.IdleMonitor \
> --object-path /org/gnome/Mutter/IdleMonitor/Core \
> --method org.gnome.Mutter.IdleMonitor.GetIdletime
(uint64 29,)
```

will return the appropriate result with no warnings.

Ciao,
 Emmanuele.

https://www.bassi.io
[@] ebassi [@gmail.com]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/dbus/attachments/20190527/890ddd7d/attachment.html>


More information about the dbus mailing list