[systemd-devel] interacting with logind to detect user idle time

Mantas Mikulėnas grawity at gmail.com
Wed May 22 09:17:41 UTC 2019


On Wed, May 22, 2019, 12:13 Germano Massullo <germano.massullo at gmail.com>
wrote:

> Good day.
> I have noticed that on many Linux distributions with different desktop
> environments, the properties
> IdleSinceHint
> IdleSinceHintMonotonic
> are always equal to zero. This happens even if you try to use a sleep
> in order to simulate a kind of user inactivity.
> What is this happening?
>

Those desktop environments just do not set the IdleHint at all.

(Logind on its own cannot determine idleness "from the outside", it relies
on the DE to pass this information.)

If your program is already X11-based, you could use the screensaver
protocol to get idle status and forward it to logind.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20190522/792ecfe0/attachment.html>


More information about the systemd-devel mailing list