Skip to content

redesign Linux idle detection #5226

@davidpanderson

Description

@davidpanderson

Related issues: #3405, #1187

The notion of "in use" (for computing preferences) means any interactive use of the host.
This includes:

  1. a physical terminal connected via RS-232
  2. remote login with ssh
  3. an xterm window on the local X11 server
  4. other interactive X11 applications
    ... am I missing anything?

Currently the client checks for input in two ways:
a) looking at the access time of tty and pty entries in /dev.
In theory this should handle cases 1-3);
remote logins and xterms create a pseudo-tty.
b) attempting to connect to the local X11 server,
and doing a XScreenSaverQueryInfo() call.
This is intended to handle case 4.

b) apparently doesn't work when the client runs as use "boinc".
And it has been argued that the client shouldn't be connecting
to ports like 6000; who knows what's there, and the client can hang.

Proposal:

  • verify that method a) actually works like we think it does,
    on all major distros, no matter what user/group the client runs as.

  • Don't do X11 stuff in the client. Instead, do what we do on Windows:
    A small "monitor" program (to be run as the desktop user) creates a shared-mem segment,
    periodically queries the X server and writes the time of last user input to shared mem.
    The client checks for the existence of this segment and reads it.

    Note: the Manager (which runs as the desktop user) could and should perform the same function
    as the monitor program.
    We should provide the monitor program for people who don't want to use the Manager.

Contact point: @AenBleidd

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    Prioritized

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions