[X2go-Commits] python-x2go.git - master (branch) updated: 0.1.1.4-17-ga64da71

X2go dev team git-admin at x2go.org
Thu Jul 28 15:44:55 CEST 2011


The branch, master has been updated
       via  a64da713a8ba239cd9591b25140fce5c86598c39 (commit)
       via  850c0bb591b9fbda5176ef44427c49ee08df5661 (commit)
      from  085f0382ddfa1d3376c1de9c2d1ec9fcf158c9b9 (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 a64da713a8ba239cd9591b25140fce5c86598c39
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Thu Jul 28 15:44:31 2011 +0200

    Stabilize sshfs related problems in case remote user is not in fuse group.

commit 850c0bb591b9fbda5176ef44427c49ee08df5661
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Thu Jul 28 15:36:59 2011 +0200

    If sound is set to false in session profile use snd_system='none' in terminal session.

-----------------------------------------------------------------------

Summary of changes:
 debian/changelog                  |    3 +++
 x2go/backends/terminal/_stdout.py |    3 +++
 x2go/session.py                   |   31 +++++++++++++++++++++++--------
 x2go/utils.py                     |    2 +-
 4 files changed, 30 insertions(+), 9 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 5e010e5..423304f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,9 @@ python-x2go (0.1.1.5-0~x2go1) unstable; urgency=low
     - Handle full path command string appropriately.
     - Fix for X2goSessionRegistry.forget method, do not complain if session_uuid
       is already forgotten.
+    - If sound is set to false in session profile use snd_system='none' in
+      terminal session.
+    - Stabilize sshfs related problems in case remote user is not in fuse group.
 
  -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Tue, 19 Jul 2011 20:44:30 +0200
 
diff --git a/x2go/backends/terminal/_stdout.py b/x2go/backends/terminal/_stdout.py
index 19d842e..461c5f3 100644
--- a/x2go/backends/terminal/_stdout.py
+++ b/x2go/backends/terminal/_stdout.py
@@ -444,6 +444,9 @@ class X2goTerminalSessionSTDOUT(object):
         Initialize Paramiko/SSH reverse forwarding tunnel for X2go folder sharing.
 
         """
+        if self.session_info.username not in self.control_session._x2go_remote_group('fuse'):
+            raise x2go_exceptions.X2goUserException('remote user %s is not member of X2go server group fuse' % self.session_info.username)
+
         # start reverse SSH tunnel for sshfs (folder sharing, printing)
         ssh_transport = self.control_session.get_transport()
         if self.reverse_tunnels[self.session_info.name]['sshfs'][1] is None:
diff --git a/x2go/session.py b/x2go/session.py
index 8265409..ca0b4cb 100644
--- a/x2go/session.py
+++ b/x2go/session.py
@@ -270,6 +270,11 @@ class X2goSession(object):
             'faulty': self.faulty,
         }
 
+        self._SUPPORTED_SOUND = SUPPORTED_SOUND
+        self._SUPPORTED_PRINTING = SUPPORTED_PRINTING
+        self._SUPPORTED_MIMEBOX = SUPPORTED_MIMEBOX
+        self._SUPPORTED_FOLDERSHARING = SUPPORTED_FOLDERSHARING
+
         self.init_control_session()
         self.terminal_session = None
 
@@ -1020,26 +1025,36 @@ class X2goSession(object):
 
             if self.has_terminal_session() and not self.faulty:
 
-                if SUPPORTED_SOUND and self.terminal_session.params.snd_system is not 'none':
+
+                if self._SUPPORTED_SOUND and self.terminal_session.params.snd_system is not 'none':
                     self.terminal_session and not self.faulty and self.terminal_session.start_sound()
+                else:
+                    self._SUPPORTED_SOUND = False
 
-                if (SUPPORTED_PRINTING and self.printing) or \
-                   (SUPPORTED_MIMEBOX and self.allow_mimebox) or \
-                   (SUPPORTED_FOLDERSHARING and self.allow_share_local_folders):
-                    self.terminal_session and not self.faulty and self.terminal_session.start_sshfs()
+                try:
+                    if (self._SUPPORTED_PRINTING and self.printing) or \
+                       (self._SUPPORTED_MIMEBOX and self.allow_mimebox) or \
+                       (self._SUPPORTED_FOLDERSHARING and self.allow_share_local_folders):
+                        self.terminal_session and not self.faulty and self.terminal_session.start_sshfs()
+                except X2goUserException:
+                    # TODO: handle this exception as a notification hook method...
+                    self._SUPPORTED_PRINTING = False
+                    self._SUPPORTED_MIMEBOX = False
+                    self._SUPPORTED_FOLDERSHARING = False
 
                 try:
                     if SUPPORTED_PRINTING and self.printing:
                         self.terminal_session and not self.faulty and self.terminal_session.start_printing()
                         self.terminal_session and not self.faulty and self.session_environment.update({'X2GO_SPOOLDIR': self.terminal_session.get_printing_spooldir(), })
                 except X2goUserException:
-                    pass
+                    # TODO: handle this exception as a notification hook method...
+                    self._SUPPORTED_PRINTING = False
 
-                if SUPPORTED_MIMEBOX and self.allow_mimebox:
+                if self._SUPPORTED_MIMEBOX and self.allow_mimebox:
                     self.terminal_session and not self.faulty and self.terminal_session.start_mimebox(mimebox_extensions=self.mimebox_extensions, mimebox_action=self.mimebox_action)
                     self.session_environment.update({'X2GO_MIMEBOX': self.terminal_session.get_mimebox_spooldir(), })
 
-                if SUPPORTED_FOLDERSHARING and self.share_local_folders:
+                if self._SUPPORTED_FOLDERSHARING and self.share_local_folders:
                     if _control.get_transport().reverse_tunnels[self.terminal_session.get_session_name()]['sshfs'][1] is not None:
                         for _folder in self.share_local_folders:
                             self.share_local_folder(_folder)
diff --git a/x2go/utils.py b/x2go/utils.py
index fb6dac4..2d8eedc 100644
--- a/x2go/utils.py
+++ b/x2go/utils.py
@@ -216,7 +216,7 @@ def _convert_SessionProfileOptions_2_SessionParams(_options):
     del _params['fullscreen']
 
     if not _options['sound']:
-        snd_system = 'none'
+        _params['snd_system'] = 'none'
     del _params['sound']
 
     if _options['rootless']:


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