The branch, release/0.1.1.x has been updated via e9076a0ea1873b0e1f7a9c16cf0b9c601c2f4638 (commit) via 585c29f342a2e0a2ae3209c33048c89dc6d08244 (commit) via c24d809ff7efa7110ef4f8887908406cb7cacf31 (commit) via a8a6acd5fb0fbbd5e040fcde37f74e71dcb66dfe (commit) from ca70479796fb685d468fb92d7ad304b3db906a1b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit e9076a0ea1873b0e1f7a9c16cf0b9c601c2f4638 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Wed Dec 7 13:10:45 2011 +0100 remove debug code commit 585c29f342a2e0a2ae3209c33048c89dc6d08244 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Wed Dec 7 12:51:37 2011 +0100 Allow session parameter change for already registered sessions. commit c24d809ff7efa7110ef4f8887908406cb7cacf31 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Wed Dec 7 10:01:24 2011 +0100 Make terminal backend ,,applications'' aware. commit a8a6acd5fb0fbbd5e040fcde37f74e71dcb66dfe Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Wed Dec 7 10:00:38 2011 +0100 Fix for list processing in INI files. ----------------------------------------------------------------------- Summary of changes: debian/changelog | 3 ++ x2go/backends/terminal/_stdout.py | 48 ++++++++++++++++-------------------- x2go/inifiles.py | 14 ++++++---- x2go/registry.py | 7 ++++- x2go/session.py | 2 +- x2go/utils.py | 1 - 6 files changed, 39 insertions(+), 36 deletions(-) The diff of changes is: diff --git a/debian/changelog b/debian/changelog index 9226146..38e263b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,9 @@ python-x2go (0.1.1.9-0-x2go1) UNRELEASED; urgency=low - Add ,,autostart'' parameter to default session profile parameters. - Add support for session window title renaming from client-side. - Introduce additional session profile parameter: setsessiontitle. + - Fix for list processing in INI files. + - Make terminal backend ,,applications'' aware. + - Allow session parameter change for already registered sessions. -- Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Wed, 12 Oct 2011 10:54:23 +0200 diff --git a/x2go/backends/terminal/_stdout.py b/x2go/backends/terminal/_stdout.py index d930247..4716877 100644 --- a/x2go/backends/terminal/_stdout.py +++ b/x2go/backends/terminal/_stdout.py @@ -112,32 +112,25 @@ class X2goSessionParams(object): @rtype: str """ - session_type = self.session_type cmd = self.cmd - if session_type in ("D", "desktop"): + if cmd == 'RDP': + self.session_type = 'R' + elif cmd.startswith('rdesktop'): + self.session_type = 'R' + elif cmd == 'XDMCP': self.session_type = 'D' - return - elif session_type in ("S", "shared", "shadow"): + elif cmd in defaults.X2GO_DESKTOPSESSIONS.keys(): + self.session_type = 'D' + elif os.path.basename(cmd) in defaults.X2GO_DESKTOPSESSIONS.values(): + self.session_type = 'D' + else: + self.session_type = 'R' + + if self.session_type in ("D", "desktop"): + self.session_type = 'D' + elif self.session_type in ("S", "shared", "shadow"): self.session_type = 'S' - return - elif cmd: - if cmd == 'RDP': - self.session_type = 'R' - return - elif cmd.startswith('rdesktop'): - self.session_type = 'R' - return - elif cmd == 'XDMCP': - self.session_type = 'D' - return - elif cmd in defaults.X2GO_DESKTOPSESSIONS.keys(): - self.session_type = 'D' - return - elif os.path.basename(cmd) in defaults.X2GO_DESKTOPSESSIONS.values(): - self.session_type = 'D' - return - self.session_type = 'R' def update(self, properties_to_be_updated={}): """\ @@ -186,7 +179,7 @@ class X2goTerminalSessionSTDOUT(object): cache_type="unix-kde", keyboard='', kblayout='null', kbtype='null/null', session_type="application", snd_system='pulse', snd_port=4713, cmd=None, - set_session_title=False, session_title="", + set_session_title=False, session_title="", applications=[], rdp_server=None, rdp_options=None, xdmcp_server=None, convert_encoding=False, server_encoding='UTF-8', client_encoding='UTF-8', @@ -910,9 +903,10 @@ class X2goTerminalSessionSTDOUT(object): if self.params.kblayout or self.params.kbtype: setkbd = "1" - cmd = self.params.cmd - if '/' in cmd: - cmd = os.path.basename(cmd) + if '/' in self.params.cmd: + self.params.cmd = os.path.basename(self.params.cmd) + + self.params.rewrite_session_type() cmd_line = [ "x2gostartagent", str(self.params.geometry), @@ -923,7 +917,7 @@ class X2goTerminalSessionSTDOUT(object): str(self.params.kbtype), str(setkbd), str(self.params.session_type), - cmd, + self.params.cmd, ] if self.params.cmd == 'XDMCP' and self.params.xdmcp_server: diff --git a/x2go/inifiles.py b/x2go/inifiles.py index 6c2afae..256130b 100644 --- a/x2go/inifiles.py +++ b/x2go/inifiles.py @@ -247,13 +247,15 @@ class X2goIniFile(object): elif key_type is types.IntType: return self.iniConfig.getint(section, key) elif key_type is types.ListType: - val = self.iniConfig.get(section, key) - if val.startswith('[') and val.endswith(']'): - return eval(val) - elif ',' in val: - val = [ v.strip() for v in val.split(',') ] + _val = self.iniConfig.get(section, key) + _val = _val.strip() + if _val.startswith('[') and _val.endswith(']'): + return eval(_val) + elif ',' in _val: + _val = [ v.strip() for v in _val.split(',') ] else: - val = [ val ] + _val = [ _val ] + return _val else: _val = self.iniConfig.get(section, key) return _val.decode(utils.get_encoding()) diff --git a/x2go/registry.py b/x2go/registry.py index 7581e09..d150588 100644 --- a/x2go/registry.py +++ b/x2go/registry.py @@ -449,6 +449,9 @@ class X2goSessionRegistry(object): session_uuid = _virgin_sessions[0].get_uuid() _params = self.client_instance.session_profiles.to_session_params(profile_id) + for _k in _params.keys(): + if _k in kwargs.keys(): + _params[_k] = kwargs[_k] self(session_uuid).update_params(_params) self(session_uuid).set_server(server) self(session_uuid).set_profile_name(profile_name) @@ -458,7 +461,9 @@ class X2goSessionRegistry(object): session_uuid = self.get_session_of_session_name(session_name) if session_uuid is not None: _params = self.client_instance.session_profiles.to_session_params(profile_id) - + for _k in _params.keys(): + if _k in kwargs.keys(): + _params[_k] = kwargs[_k] self(session_uuid).update_params(_params) self(session_uuid).set_server(server) self(session_uuid).set_profile_name(profile_name) diff --git a/x2go/session.py b/x2go/session.py index 05d4677..eabef78 100644 --- a/x2go/session.py +++ b/x2go/session.py @@ -63,7 +63,7 @@ _X2GO_SESSION_PARAMS = ('geometry', 'depth', 'link', 'pack', 'cache_type', 'kblayout', 'kbtype', 'session_type', 'snd_system', 'snd_port', 'cmd', 'set_session_title', 'session_title', - 'rdp_server', 'rdp_options', + 'rdp_server', 'rdp_options', 'applications', 'xdmcp_server', 'rootdir', 'loglevel', 'profile_name', 'profile_id', 'print_action', 'print_action_args', diff --git a/x2go/utils.py b/x2go/utils.py index 4f677f4..46e9518 100644 --- a/x2go/utils.py +++ b/x2go/utils.py @@ -256,7 +256,6 @@ def _convert_SessionProfileOptions_2_SessionParams(_options): 'soundtunnel', 'defsndport', 'icon', - 'applications', 'autostart', ] for i in _ignored_options: hooks/post-receive -- python-x2go.git (Python X2Go Client API) This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "python-x2go.git" (Python X2Go Client API).