[systemd-devel] interacting with logind to detect user idle time
Lennart Poettering
lennart at poettering.net
Fri May 17 08:12:37 UTC 2019
On Do, 16.05.19 17:12, Germano Massullo (germano.massullo at gmail.com) wrote:
> To do practise I am using NetworkManager example [1]
> All macros passed as arguments to functions
> g_dbus_proxy_call_sync
> g_dbus_proxy_new_for_bus_sync
> are implemented at [2].
> Is there an equivalent of [2] for logind? I made a quick search into
> systemd repository [3] but I am getting too many results with the
> search words I am using. I just need to figure out what parameters I
> have to pass to the previous functions in order to retrieve
> IdleSinceHint property
If you are looking for some help regarding gdbus, it's probably best
to inquire on some gdbus/glib mailing list.
With the "busctl" tool you can read the propery with a command like
the following:
busctl get-property org.freedesktop.login1 /org/freedesktop/login1/session/_31 org.freedesktop.login1.Session IdleSinceHint
I am sure the gdbus folks will be able to give you the right hints how
to do the same with native gdbus API calls quickly if you ask them for
the equivalent of the above line.
Lennart
--
Lennart Poettering, Berlin
More information about the systemd-devel
mailing list