diff --git a/server/src/uds/transports/X2GO/TX2GOTransport.py b/server/src/uds/transports/X2GO/TX2GOTransport.py index 319e7386..536b74d6 100644 --- a/server/src/uds/transports/X2GO/TX2GOTransport.py +++ b/server/src/uds/transports/X2GO/TX2GOTransport.py @@ -46,7 +46,7 @@ import logging import random import string -__updated__ = '2016-11-07' +__updated__ = '2017-01-09' logger = logging.getLogger(__name__) @@ -82,13 +82,13 @@ class TX2GOTransport(BaseX2GOTransport): raise BaseX2GOTransport.ValidationException(_('Must use HOST:PORT in Tunnel Server Field')) def getUDSTransportScript(self, userService, transport, ip, os, user, password, request): - priv, pub = self.getAndPushKey('user', userService) - prefs = user.prefs('nx') ci = self.getConnectionInfo(userService, user, password) username = ci['username'] + priv, pub = self.getAndPushKey(username, userService) + width, height = CommonPrefs.getWidthHeight(prefs) logger.debug('') @@ -102,7 +102,8 @@ class TX2GOTransport(BaseX2GOTransport): windowManager=self.desktopType.value, exports=self.exports.isTrue(), width=width, - height=height + height=height, + user=username ) tunpass = ''.join(random.choice(string.letters + string.digits) for _i in range(12)) diff --git a/server/src/uds/transports/X2GO/X2GOTransport.py b/server/src/uds/transports/X2GO/X2GOTransport.py index a81f9374..f81cd89d 100644 --- a/server/src/uds/transports/X2GO/X2GOTransport.py +++ b/server/src/uds/transports/X2GO/X2GOTransport.py @@ -40,7 +40,7 @@ from . import x2gofile import logging -__updated__ = '2016-11-07' +__updated__ = '2017-01-09' logger = logging.getLogger(__name__) @@ -67,12 +67,11 @@ class X2GOTransport(BaseX2GOTransport): quality = BaseX2GOTransport.quality def getUDSTransportScript(self, userService, transport, ip, os, user, password, request): - priv, pub = self.getAndPushKey('user', userService) - prefs = user.prefs('nx') ci = self.getConnectionInfo(userService, user, password) username = ci['username'] + priv, pub = self.getAndPushKey(username, userService) width, height = CommonPrefs.getWidthHeight(prefs) @@ -85,7 +84,8 @@ class X2GOTransport(BaseX2GOTransport): windowManager=self.desktopType.value, exports=self.exports.isTrue(), width=width, - height=height + height=height, + user=username ) # data diff --git a/server/src/uds/transports/X2GO/x2gofile.py b/server/src/uds/transports/X2GO/x2gofile.py index 191d835d..4a1e76dc 100644 --- a/server/src/uds/transports/X2GO/x2gofile.py +++ b/server/src/uds/transports/X2GO/x2gofile.py @@ -67,7 +67,7 @@ print=true name=UDS/connect icon=:/img/icons/128x128/x2gosession.png host={{ip}} -user=user +user={user} key={{keyFile}} rdpport=3389 sshport={{port}} @@ -94,7 +94,7 @@ sshproxyautologin=false sshproxykrblogin=false ''' -def getTemplate(speed, pack, quality, sound, soundSystem, windowManager, exports, width, height): +def getTemplate(speed, pack, quality, sound, soundSystem, windowManager, exports, width, height, user): trueFalse = lambda(x): 'true' if x else 'false' export = 'export="{export}"' if exports else '' if width == -1 or height == -1: @@ -113,5 +113,6 @@ def getTemplate(speed, pack, quality, sound, soundSystem, windowManager, exports export=export, width=width, height=height, - fullscreen=fullscreen + fullscreen=fullscreen, + user=user )