[X2Go-User] Setting Number of Allowed Connections Per User Account

senrabdet at aol.com senrabdet at aol.com
Mon Mar 26 18:00:45 CEST 2012

Hi All:

We're hoping to set and enable the number of allowed connections/sessions by user and user group in x2go.  E.g., we want to limit a user to one session/connection/display at a time:  that means from client machine A, if the user A is connected, a connection to his/her account could not be established from client machine B or a second connection couldn't be established from client Machine A.  User A, if s/he had second account on the server, however, could start one and only one connection to that second account while running one and only one session to the first account.

We think we've seen some posts to this effect involving editing /etc/x2go/x2goserver.conf and /usr/bin/x2gosessionlimit (see http://comments.gmane.org/gmane.linux.terminal-server.x2go.devel/954).  We've tried making some of the following types of edits:

A)  If we edit x2goserver.conf alone, and set either "UserA=1 and/or "UserGroupA=1", we can make multiple connections.  When we start another instance of x2go, it shows there is a current session, and when we select "New" in the GUI, a second concurrent session begins.

B)  If we edit  /usr/bin/x2gosessionlimit, and make the following changes and then do a "service x2goserver restart" (not sure if this restart is appropriate or necessary)...

Add these lines:

 if($strlimit <= $scount)
         print "LIMIT\n";
         exit 0;
Comment out these lines:
 if($maxlimit <= $scount)
         print "$maxlimit\n";
         exit 0;
print "$maxlimit\n";

....and change settings in x2goserver.conf, we got some inconstant results we haven't been able to duplicate, but were along the lines 
either of a "session limit being exceeded" message even if we had group and/or user limits set to 1 (i.e., we were unable to connect at all), 
or back to any number of sessions we wanted to start.

Can someone suggest a procedure/example of how to do this successfully?  Ideally, we'd like the flexibility to limit # of connections/sessions both
by user group and individual user.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x2go.org/pipermail/x2go-user/attachments/20120326/d30c5d30/attachment.html>

More information about the x2go-user mailing list