<div><div>Unfortunately, this method is unacceptable for thin clients, but suggested using crontab.</div><div>Here is a working script for cron shutdown:</div><div> </div><div><div># shutdown x2gothinclient if not X-session</div><div>XSES=`ps ax | grep X |sed -n '/nxproxy/p'`</div><div>[ -n "$XSES" ] && echo "XORG run ! " || shutdown -h now</div><div> </div></div></div><div> </div><div>21.08.2021, 18:41, "Mike Gabriel" <mike.gabriel@das-netzwerkteam.de>:</div><blockquote><p>On Fr 20 Aug 2021 09:41:30 CEST, ovt wrote:<br /> </p><blockquote> We need a script for a thin client:<br /> If within 10 minutes the user has not opened a session, turn off the<br /> computer.</blockquote><p><br />You could install shutdown-at-night [1] on those thinclients and call<br />the script every 20 minutes.<br /><br />The shutdown-at-night package might need some adjustments, though for<br />detecting that someone is logged in via X2Go or not. The<br />shutdown-at-night tool works great on desktop computers.<br /><br />Mike<br /><br />[1] <a href="https://packages.debian.org/sid/shutdown-at-night" rel="noopener noreferrer">https://packages.debian.org/sid/shutdown-at-night</a></p>--<br /><br />DAS-NETZWERKTEAM<br />c\o Technik- und Ökologiezentrum Eckernförde<br />Mike Gabriel, Marienthaler Str. 17, 24340 Eckernförde<br />mobile: +49 (1520) 1976 148<br />landline: +49 (4351) 850 8940<br /><br />GnuPG Fingerprint: 9BFB AEE8 6C0A A5FF BF22 0782 9AF4 6B30 2577 1B31<br />mail: <a href="mailto:mike.gabriel@das-netzwerkteam.de" rel="noopener noreferrer">mike.gabriel@das-netzwerkteam.de</a>, <a href="http://das-netzwerkteam.de/" rel="noopener noreferrer">http://das-netzwerkteam.de</a></blockquote>