> Hmm, weren't your last words "I can easily combine the information from 
> x2golistsessions_root and the load balancer to determine if sessions are 
> executing work in the background and thus avoid killing them."?
Yes. That's actually in place and working very well. This environment can't 
tolerate users having an application open and sitting idle (not suspended) on 
their computer screens without time limits.

I appreciate your help. I understand some of these request may seem unorthodox, 
but I guarantee you they are driven by legitimate business needs and 
constraints. 

Thanks,
Ivan.

-----Original Message-----
From: x2go-user [mailto:[email protected]] On Behalf Of Stefan 
Baur
Sent: Thursday, September 07, 2017 5:34 PM
To: [email protected]
Subject: Re: [X2Go-User] Disable session suspension

Am 06.09.2017 um 19:01 schrieb Ivan Gomez:

> Is it possible to disable session suspension in x2goserver? Instead of 
> suspending, I'd like to terminate them.
Hmm, weren't your last words "I can easily combine the information from 
x2golistsessions_root and the load balancer to determine if sessions are 
executing work in the background and thus avoid killing them."?

So now you're planning to kill them regardless?
Parse the output of x2golistsessions_root in a cronjob, select those that have 
the suspended flag, and issue x2goterminate-session on their session id (as 
root).
Of course, one small network glitch and they're gone before the user has a 
chance to reconnect, so you might want to check the timestamp in the 
x2golistsessions_root output, and only terminate those that are suspended for 
longer than n minutes.

Untested and nasty hack that could/should work without a cronjob:
Create a Symlink in "/usr/local/bin/" named "x2gosuspend-session" and have it 
point at "/usr/bin/x2goterminate-session".

Of course, the sane approach would be using a load balancer that can actually 
handle reconnects.  Ours does and is called X2Go Session Broker. ;-)

-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

_______________________________________________
x2go-user mailing list
[email protected]
https://lists.x2go.org/listinfo/x2go-user

Reply via email to