[X2Go-User] Disable session suspension

Stefan Baur X2Go-ML-1 at baur-itcs.de
Thu Sep 7 23:34:14 CEST 2017


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.x2go.org/pipermail/x2go-user/attachments/20170907/e677a24c/attachment.sig>


More information about the x2go-user mailing list