Am 18.08.2017 um 21:08 schrieb Ivan Gomez: > I was wondering if there is a way to timeout sessions after a certain > period of inactivity?
> I have several users launching application through X2Go and they may > leave the windows idle for several days. Ideally I would like to be able > to kill those sessions after a certain period of inactivity. Is this > possible? Well, some people might do this intentionally, like people use screen or tmux to keep a task running even when they're not present or not even connected to the system. Terminating their sessions when they don't expect it might not be the best idea. You could set up a cron job that parses the output of x2golistsessions_root and calls x2goterminate-session for each sessionid (field 2) that is older than n days (using field 6:init time, or field 11:last time dataset has been updated, or field 13, session age in seconds), but that will terminate sessions that have been open that long, no matter if they're idle or actively used. Of course, if you filter for suspended sessions only (field 5, state S), then you could use it to terminate suspended sessions older than n days - but be sure to use field 11 for the check, then, or you will terminate a user that had a running session for n days, and just suspended it a moment ago ... -Stefan -- BAUR-ITCS UG (haftungsbeschränkt) Geschäftsführer: Stefan Baur Eichenäckerweg 10, 89081 Ulm | Registergericht Ulm, HRB 724364 Fon/Fax 0731 40 34 66-36/-35 | USt-IdNr.: DE268653243
signature.asc
Description: OpenPGP digital signature
_______________________________________________ x2go-user mailing list [email protected] https://lists.x2go.org/listinfo/x2go-user
