[X2go-Commits] python-x2go.git - build-main (branch) updated: 0.1.1.9

X2go dev team git-admin at x2go.org
Sun Jan 29 00:59:31 CET 2012


The branch, build-main has been updated
       via  2b21fdeb24300c03fd9d8cb35fbdd922d7b9a936 (commit)
       via  59cc4c580fc93da0a26cffd80cd8cc0eff457762 (commit)
       via  58f1c8f18a905432ed0d1b31a583bfbffc013bb4 (commit)
       via  e9076a0ea1873b0e1f7a9c16cf0b9c601c2f4638 (commit)
       via  585c29f342a2e0a2ae3209c33048c89dc6d08244 (commit)
       via  c24d809ff7efa7110ef4f8887908406cb7cacf31 (commit)
       via  a8a6acd5fb0fbbd5e040fcde37f74e71dcb66dfe (commit)
       via  ca70479796fb685d468fb92d7ad304b3db906a1b (commit)
       via  dcee824ce2866e545658c4edaf01d24e19e1a2db (commit)
       via  5645572c71bf2c41e25996344cf39da917040404 (commit)
       via  b6f5654f0fd3ec9f827ab66d8e8dc186e4374f11 (commit)
       via  d089fd5ee17e09d8a28a1c997a43cfdd933d1d3a (commit)
       via  f55075f3005bf50a3d04df610821def237f939de (commit)
       via  e9ca24230ed88228bea4beba570e31773ea63e68 (commit)
       via  f0c99e80ca783ea5c43ebf1d7651a2335a07e5a6 (commit)
       via  e6ac02a48a23270d8bf427e5bde3ae1e1a070d5c (commit)
       via  ef42568fa9055c6227fea094daaceba96e7c54b4 (commit)
      from  a9f62e1eed7eb86b0cb74533055007e35f2f9ba3 (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 -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 debian/changelog                  |   18 +++++++++
 x2go/__init__.py                  |    2 +-
 x2go/backends/terminal/_stdout.py |   72 ++++++++++++++++++++-----------------
 x2go/client.py                    |    5 ++-
 x2go/defaults.py                  |    2 +
 x2go/inifiles.py                  |   14 ++++---
 x2go/monkey_patch_paramiko.py     |    6 ++--
 x2go/registry.py                  |    7 +++-
 x2go/session.py                   |    4 +-
 x2go/utils.py                     |    4 ++-
 10 files changed, 86 insertions(+), 48 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 9ea2e5a..3660d8a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,21 @@
+python-x2go (0.1.1.9-0-x2go1) unstable; urgency=low
+
+  * New upstream version (0.1.1.9), bugfix release for 0.1.1.x series:
+    - Ignore session registry exceptions for profiles that just got disconnected.
+    - Fix exception raisal in X2goTerminalSessionSTDOUT.
+    - Print access to an X2Go server is not controlled by x2goprint group membership,
+      but by fuse membership.
+    - Add XFCE4 support.
+    - 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.
+    - Fix license of monkey_patch_paramiko.py to GPLv3+ for 0.1.1.x series.
+
+ -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Fri, 27 Jan 2012 23:36:13 +0100
+
 python-x2go (0.1.1.8-0-x2go1) unstable; urgency=low
 
   [ Mike Gabriel ]
diff --git a/x2go/__init__.py b/x2go/__init__.py
index 54090c1..0b8ae25 100644
--- a/x2go/__init__.py
+++ b/x2go/__init__.py
@@ -158,7 +158,7 @@ Contact
 """
 
 __NAME__    = 'python-x2go'
-__VERSION__ = '0.1.1.8'
+__VERSION__ = '0.1.1.9'
 
 from gevent import monkey
 monkey.patch_all()
diff --git a/x2go/backends/terminal/_stdout.py b/x2go/backends/terminal/_stdout.py
index e0eb3f1..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,6 +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="", applications=[],
                  rdp_server=None, rdp_options=None,
                  xdmcp_server=None,
                  convert_encoding=False, server_encoding='UTF-8', client_encoding='UTF-8',
@@ -303,6 +297,8 @@ class X2goTerminalSessionSTDOUT(object):
         self.params.update()
 
         self.profile_name = profile_name
+        self.set_session_title = set_session_title
+        self.session_title = session_title
         self.proxy_backend = proxy_backend
 
         self.snd_port = snd_port
@@ -322,7 +318,7 @@ class X2goTerminalSessionSTDOUT(object):
             if self.session_info.name:
                 self.session_info.local_container = os.path.join(self.params.rootdir, 'S-%s' % self.session_info.name)
             else:
-                raise X2goTerminalSessionException('no valid session info availble')
+                raise x2go_exceptions.X2goTerminalSessionException('no valid session info availble')
         else:
             self.session_info = info_backend()
 
@@ -458,7 +454,7 @@ class X2goTerminalSessionSTDOUT(object):
 
         """
         if not self.control_session.is_folder_sharing_available():
-            raise x2go_exceptions.X2goUserException('remote user %s is not member of X2go server group fuse' % self.session_info.username)
+            raise x2go_exceptions.X2goUserException('Remote user %s is not allowed to share local folders with the server.' % self.session_info.username)
 
         # start reverse SSH tunnel for sshfs (folder sharing, printing)
         ssh_transport = self.control_session.get_transport()
@@ -506,8 +502,8 @@ class X2goTerminalSessionSTDOUT(object):
         Initialize X2go print spooling.
 
         """
-        if self.session_info.username not in self.control_session._x2go_remote_group('x2goprint'):
-            raise x2go_exceptions.X2goUserException('remote user %s is not member of X2go server group x2goprint' % self.session_info.username)
+        if not self.control_session.is_folder_sharing_available():
+            raise x2go_exceptions.X2goUserException('Remote user %s is not allowed to share local folders with the server.' % self.session_info.username)
 
         spool_dir = os.path.join(self.session_info.local_container, 'spool')
         if not os.path.exists(spool_dir):
@@ -552,6 +548,9 @@ class X2goTerminalSessionSTDOUT(object):
         Initialize X2go mimebox handling.
 
         """
+        if not self.control_session.is_folder_sharing_available():
+            raise x2go_exceptions.X2goUserException('Remote user %s is not allowed to share local folders with the server.' % self.session_info.username)
+
         mimebox_dir = os.path.join(self.session_info.local_container, 'mimebox')
         if not os.path.exists(mimebox_dir):
             os.mkdir(mimebox_dir)
@@ -605,7 +604,7 @@ class X2goTerminalSessionSTDOUT(object):
 
         """
         if not self.control_session.is_folder_sharing_available():
-            raise x2go_exceptions.X2goUserException('remote user %s is not member of X2go server group fuse' % self.session_info.username)
+            raise x2go_exceptions.X2goUserException('Remote user %s is not allowed to share local folders with the server.' % self.session_info.username)
 
         if local_path is None:
             self.logger('no folder name given...', log.loglevel_WARN)
@@ -904,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),
@@ -917,12 +917,18 @@ 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:
             cmd_line = ['X2GOXDMCP=%s' % self.params.xdmcp_server] + cmd_line
 
+        if self.set_session_title:
+            cmd_line = ['X2GO_CLIENTFEATURE_SET_SESSIONTITLE=enabled '] + cmd_line
+
+        if self.session_title:
+            cmd_line = ['X2GO_SESSION_WINDOW_TITLE="%s" ' % self.session_title] + cmd_line
+
         (stdin, stdout, stderr) = self.control_session._x2go_exec_command(cmd_line)
 
         _stdout = stdout.read()
@@ -939,9 +945,9 @@ class X2goTerminalSessionSTDOUT(object):
                                          hostname=self.control_session.get_transport().getpeername(),
                                         )
         except ValueError:
-            raise X2goTerminalSessionException("failed to start X2go session")
+            raise x2go_exceptions.X2goTerminalSessionException("failed to start X2go session")
         except IndexError:
-            raise X2goTerminalSessionException("failed to start X2go session")
+            raise x2go_exceptions.X2goTerminalSessionException("failed to start X2go session")
 
         # local path may be a Windows path, so we use the path separator of the local system
         self.session_info.local_container = os.path.join(self.params.rootdir, 'S-%s' % self.session_info.name)
diff --git a/x2go/client.py b/x2go/client.py
index 2af4230..da34e9b 100644
--- a/x2go/client.py
+++ b/x2go/client.py
@@ -2517,5 +2517,8 @@ class X2goClient(object):
 
         """
         for profile_name in self.client_connected_profiles(return_profile_names=True):
-            self.__register_available_server_sessions_by_profile_name(profile_name)
+            try:
+                self.__register_available_server_sessions_by_profile_name(profile_name)
+            except X2goSessionRegistryException:
+                pass
     __register_available_server_sessions_all_profiles = register_available_server_sessions_all_profiles
diff --git a/x2go/defaults.py b/x2go/defaults.py
index 9d60613..5cc9f05 100644
--- a/x2go/defaults.py
+++ b/x2go/defaults.py
@@ -265,6 +265,7 @@ X2GO_GENERIC_APPLICATIONS = [ 'WWWBROWSER', 'MAILCLIENT', 'OFFICE', 'TERMINAL',
 """X2go's generic applications."""
 
 X2GO_SESSIONPROFILE_DEFAULTS = {
+    'autostart': False, 'setsessiontitle': False, 'sessiontitle': "",
     'speed': 2, 'pack': '16m-jpeg', 'quality': 9,
     'iconvto': 'UTF-8', 'iconvfrom': 'UTF-8', 'useiconv': False,
     'usesshproxy': False, 'sshproxyhost': '', 'sshproxyuser': '', 'sshproxytunnel': '', 'sshproxykeyfile': '',
@@ -349,6 +350,7 @@ X2GO_DESKTOPSESSIONS={
     'LXDE': 'startlxde',
     'TRINITY': 'starttrinity',
     'UNITY': 'unity-2d-launcher',
+    'XFCE4': 'xfce4-session',
 }
 """A dictionary with meta-commands for X2go's window manager sessions."""
 
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/monkey_patch_paramiko.py b/x2go/monkey_patch_paramiko.py
index c9a460a..ffaa7f8 100644
--- a/x2go/monkey_patch_paramiko.py
+++ b/x2go/monkey_patch_paramiko.py
@@ -3,16 +3,16 @@
 # Copyright (C) 2010-2011 by Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
 #
 # Python X2go is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
+# it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3 of the License, or
 # (at your option) any later version.
 #
 # Python X2go is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Affero General Public License for more details.
+# GNU General Public License for more details.
 #
-# You should have received a copy of the GNU Affero General Public License
+# You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the
 # Free Software Foundation, Inc.,
 # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
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 88d2a73..eabef78 100644
--- a/x2go/session.py
+++ b/x2go/session.py
@@ -62,8 +62,8 @@ from defaults import SUPPORTED_SOUND, SUPPORTED_PRINTING, SUPPORTED_FOLDERSHARIN
 _X2GO_SESSION_PARAMS = ('geometry', 'depth', 'link', 'pack',
                         'cache_type', 'kblayout', 'kbtype',
                         'session_type', 'snd_system', 'snd_port',
-                        'cmd',
-                        'rdp_server', 'rdp_options',
+                        'cmd', 'set_session_title', 'session_title',
+                        '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 9af2ef1..46e9518 100644
--- a/x2go/utils.py
+++ b/x2go/utils.py
@@ -162,6 +162,8 @@ def _convert_SessionProfileOptions_2_SessionParams(_options):
             'sshproxyuser': 'sshproxy_user',
             'sshproxykeyfile': 'sshproxy_key_filename',
             'sshproxytunnel': 'sshproxy_tunnel',
+            'sessiontitle': 'session_title',
+            'setsessiontitle': 'set_session_title',
     }
     _speed_dict = {
             '0': 'modem',
@@ -254,7 +256,7 @@ def _convert_SessionProfileOptions_2_SessionParams(_options):
             'soundtunnel',
             'defsndport',
             'icon',
-            'applications',
+            'autostart',
     ]
     for i in _ignored_options:
         del _params[i]


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).




More information about the x2go-commits mailing list