Re: Cannot use gdbus command against same arguments of dbus-send

Emmanuele Bassi <[email protected]>
Newsgroups gmane.comp.freedesktop.dbus
Message-ID <CALnHYQHQwui3ezd1K+i9U2C05abFA3Ovq3rp=Rt3_31AiONU0A@mail.gmail.com>
On Mon, 27 May 2019 at 15:17, Germano Massullo <[email protected]>
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]

_______________________________________________
dbus mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dbus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.