be2bb14f00441d9e4a26f94834518db3829e83ed
Previously we'd allow marking TTY sessions as idle, but when the user tried to unmark it as idle again it we'd just revert to automatic TTY atime idle detection, thus making it impossible to mark the session as non-idle, unless its TTY is atime-touched all the time. But of course, marking a session as idle is pretty much fatal if you never can mark it as non-idle again. This change is triggred by bug reports such as this: https://github.com/systemd/systemd/issues/14053 With this patch we will now output a clean, clear error message if a client tries to manipulate the idle state of a non-graphical session. This means we now have clear rules: "manual" idle logic for graphical sessions, and TTY based ones for all others that have a TTY of some form. I considered allowing the idle state to be overriden both ways for tty sessions but that's problematic: for sessions that are temporarily upgraded from tty to graphical and thus suddenly want to manage their own idle state we'd need to a way to detect when the upgrade goes away and thus we should revert to old behaviour. Without reverting to the previous TTY idle auto-magic we'd otherwise be stuck in an eternally idle or eternally non-idle state, with really bad effects in case auto-suspend is used. Thus, let's instead generate a proper error message, saying clearly we don't support it. (Also includes some other fixes and clean-ups in related code) Closes: #14053
…
…
…
System and Service Manager
Details
General information about systemd can be found in the systemd Wiki.
Information about build requirements is provided in the README file.
Consult our NEWS file for information about what's new in the most recent systemd versions.
Please see the Hacking guide for information on how to hack on systemd and test your modifications.
Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.
When preparing patches for systemd, please follow our Coding Style Guidelines.
If you are looking for support, please contact our mailing list or join our IRC channel.
Stable branches with backported patches are available in the stable repo.
Languages
C
88.5%
Shell
5.7%
Python
4.6%
Meson
1.1%
