You are not logged in.
Pages: 1
I am running a KDE session via tigervnc. The server is headless i.e., no keyboard, mouse or monitor is connected to it. I would like the server to sleep if there is no activity for 30 mins. I tried to set the idle time in logind.conf to 30 mins by setting these two parameters:
IdleAction=suspend
IdleActionSec=30min
The result is that the computer sleeps after 30 mins regardless of any activity in the KDE session. When I do the "w" command it reports that thee KDE session is idle since it was started irrespective of any activity inside the session. Is this the expected behavior (that KDE doesn't report the activity inside a VNC session)?
What is the way to achieve the goal of shutting down the server when there is no activity in the KDE session (I thought of writing a script using "xprintidle" -- that seems to capture session activity -- but it only reports the current session activity and doesn't take into activity in other user's KDE sessions).
Thanks!
Offline
I don't think systemd considers remote sessions in terms of "idle" or "not idle", which is why the server shuts down after 30 minutes, even if there are still remote sessions connected.
You also indicate that it's possible that there are several remote sessions at a time. I believe KDE has settings for auto-log-out on inactivity. That should remove all inactive sessions automatically after a time-out. You should be able to script something that periodically checks the total number of sessions and when it's dropped to zero, power off the server?
Offline
Pages: 1