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

X2go dev team git-admin at x2go.org
Wed Jul 6 17:57:59 CEST 2011


The branch, build-main has been updated
       via  d5f871ba0fa17cd63dc3bca118844ec74f3ebb03 (commit)
       via  c84844dfe09359d4f113a533f89362581a0eb947 (commit)
       via  481acc6867d37250684a1530c24b32fa3dbd49ae (commit)
       via  6192724a528b0d585823170f54c2eced49098169 (commit)
       via  07f7380d8c343c7f583aa1faf45ad42d056c19c5 (commit)
      from  3fb1a45de69efba836f725c5e8ae5ca128959127 (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:
 README                            |    9 +++--
 README.Trinity-Desktop            |    4 +-
 TODO                              |   14 ++++----
 debian/changelog                  |   16 +++++++-
 x2go/__init__.py                  |    2 +-
 x2go/backends/terminal/_stdout.py |    3 +-
 x2go/cleanup.py                   |   68 ++++++++++++++++++++----------------
 x2go/client.py                    |   15 ++++++--
 x2go/session.py                   |   24 +++++++++++--
 9 files changed, 101 insertions(+), 54 deletions(-)

The diff of changes is:
diff --git a/README b/README
index f035109..933f874 100644
--- a/README
+++ b/README
@@ -61,8 +61,9 @@ and wholeheartedness concerning this inner process.
 * reading/writing session profiles from file
 * sharing of local (client-side) folders (SFTP server is integrated in Python X2go)
 * connect via proxy SSH server
-* X2go dropbox support
-
+* X2go MIME box support
+* desktop sharing (shadow sessions)
+* color depth auto-recognition
 
 === Installation ===
 
@@ -133,6 +134,6 @@ check if your issues have already been solved in the HEAD of python-x2go code.
 For now, bugs can be reported via mail to mike.gabriel at das-netzwerkteam.de
 
 
-light+love
-Mike Gabriel
+light+love, 20110701
+Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
 
diff --git a/README.Trinity-Desktop b/README.Trinity-Desktop
index 14bffc2..df6ee02 100644
--- a/README.Trinity-Desktop
+++ b/README.Trinity-Desktop
@@ -9,5 +9,5 @@ point from /usr/local/bin/starttrinity to Trinity's startkde script:
 
   root at x2goserver:~ ln -s /opt/trinity/bin/startkde /usr/local/bin/starttrinity
 
-light+love,
-Mike Gabriel 20110527
\ No newline at end of file
+light+love, 20110527
+Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
\ No newline at end of file
diff --git a/TODO b/TODO
index 1ab675b..52ceb74 100644
--- a/TODO
+++ b/TODO
@@ -1,4 +1,4 @@
-python-x2go - Copyright (C) 2010 by Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
+python-x2go - Copyright (C) 2010-2011 by Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
 
 Published under the terms of the GNU General Public License.
 See http://www.gnu.org/licenses/gpl.html for a recent copy.
@@ -6,12 +6,12 @@ See http://www.gnu.org/licenses/gpl.html for a recent copy.
 
 === pyhton-x2go TODOs ===
 
-as of 20101209
+as of 20110701
 --------------
-* add shadow session support
-* improve X2go client profile support
 * add LDAP support
 * add HTTP broker support
+* add Windows Registry backend (session profiles, client configs)
+* add gconf backend (session profiles, client configs)
 
 === Python X2go wishlist ===
 
@@ -19,7 +19,7 @@ as of 20101209
 
 
 To report bugs and ideas, please add your contributions and comments
-on http://bugs.das-netzwerkteam.de/
+on http://code.x2go.org/
 
-light+love
-Mike Gabriel <m.gabriel at das-netzwerkteam.de>
+light+love, 20110701
+Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
diff --git a/debian/changelog b/debian/changelog
index 67214b1..9ca8382 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,16 @@
-python-x2go (0.1.1.2-0~x2go1) UNRELEASED; urgency=low
+python-x2go (0.1.1.3-0~x2go1) UNRELEASED; urgency=low
+
+  * New upstream version (0.1.1.3):
+    - README/TODO update.
+    - Desktop sharing: try ''<user>@<display>.0'' additionally to ''<user>@<display>'' when
+      trying to find a desktop for sharing.
+    - Fix AttributeError if no graphical proxy instance has been declared yet.
+    - Do not allow any interruption during X2go cleanup calls.
+    - Stabilize desktop sharing if the remote session is not available.
+
+ -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Fri, 01 Jul 2011 14:53:48 +0200
+
+python-x2go (0.1.1.2-0~x2go1) unstable; urgency=low
 
   * New upstream version (0.1.1.2):
     - bugfix version
@@ -11,7 +23,7 @@ python-x2go (0.1.1.2-0~x2go1) UNRELEASED; urgency=low
     - Fix MIME box action SAVEAS.
     - Fix for session status notification for sessions with PENDING terminal session.
 
- -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Fri, 24 Jun 2011 16:42:20 +0200
+ -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Fri, 01 Jul 2011 14:53:43 +0200
 
 python-x2go (0.1.1.1-0~x2go1) unstable; urgency=low
 
diff --git a/x2go/__init__.py b/x2go/__init__.py
index ae8f7f1..1c6beca 100644
--- a/x2go/__init__.py
+++ b/x2go/__init__.py
@@ -158,7 +158,7 @@ Contact
 """
 
 __NAME__    = 'python-x2go'
-__VERSION__ = '0.1.1.2'
+__VERSION__ = '0.1.1.3'
 
 from gevent import monkey
 monkey.patch_all()
diff --git a/x2go/backends/terminal/_stdout.py b/x2go/backends/terminal/_stdout.py
index 4c439fd..24fc74e 100644
--- a/x2go/backends/terminal/_stdout.py
+++ b/x2go/backends/terminal/_stdout.py
@@ -962,5 +962,6 @@ class X2goTerminalSessionSTDOUT(object):
         STILL UNDOCUMENTED
 
         """
-        self.proxy.__del__()
+        if self.proxy is not None:
+            self.proxy.__del__()
 
diff --git a/x2go/cleanup.py b/x2go/cleanup.py
index 8b72614..ab28fe6 100644
--- a/x2go/cleanup.py
+++ b/x2go/cleanup.py
@@ -62,39 +62,47 @@ def x2go_cleanup(e=None, threads=None):
     @type threads: C{list}
 
     """
-    if threads is None:
-        threads = threading.enumerate()
-    else:
-        threads = threads
-
-    # stop X2go reverse forwarding tunnels
-    for t in threads:
-        if type(t) == rforward.X2goRevFwTunnel:
-            t.stop_thread()
-            del t
-
-    # stop X2go paramiko transports used by X2goTerminalSession objects
-    for t in threads:
-        if type(t) == paramiko.Transport:
-            if hasattr(t, '_x2go_session_marker'):
-                t.stop_thread()
-                del t
+    try:
+        if threads is None:
+            threads = threading.enumerate()
+        else:
+            threads = threads
 
-    # on Windows: stop the XServer that we evoked
-    if _X2GOCLIENT_OS == 'Windows':
+        # stop X2go reverse forwarding tunnels
         for t in threads:
-            if type(t) == xserver.X2goXServer:
+            if type(t) == rforward.X2goRevFwTunnel:
                 t.stop_thread()
-                gevent.sleep(1)
                 del t
 
-    # on Windows: stop the PulseAudio daemon that we evoked
-    if _X2GOCLIENT_OS == 'Windows':
+        # stop X2go paramiko transports used by X2goTerminalSession objects
         for t in threads:
-            if type(t) == pulseaudio.X2goPulseAudio:
-                t.stop_thread()
-                gevent.sleep(1)
-                del t
-
-    if e is not None:
-        raise e
+            if type(t) == paramiko.Transport:
+                if hasattr(t, '_x2go_session_marker'):
+                    t.stop_thread()
+                    del t
+
+        # on Windows: stop the XServer that we evoked
+        if _X2GOCLIENT_OS == 'Windows':
+            for t in threads:
+                if type(t) == xserver.X2goXServer:
+                    t.stop_thread()
+                    gevent.sleep(1)
+                    del t
+
+        # on Windows: stop the PulseAudio daemon that we evoked
+        if _X2GOCLIENT_OS == 'Windows':
+            for t in threads:
+                if type(t) == pulseaudio.X2goPulseAudio:
+                    t.stop_thread()
+                    gevent.sleep(1)
+                    del t
+
+        if e is not None:
+            raise e
+
+    except KeyboardInterrupt:
+        # do not allow keyboard interrupts during Python X2go cleanup
+        pass
+    except SystemExit:
+        # neither do we allow SIGTERM signals during cleanup...
+        pass
diff --git a/x2go/client.py b/x2go/client.py
index 1327d33..d7e6fb1 100644
--- a/x2go/client.py
+++ b/x2go/client.py
@@ -1198,13 +1198,22 @@ class X2goClient(object):
         @rtype: C{bool}
 
         """
-        _desktop = desktop or "%s@%s" % (user, display)
 
         # X2goClient.list_desktops() uses caching (if enabled, so we prefer lookups here...
+        if desktop:
+            _desktop = desktop
+            user = None
+            display = None
+        else:
+            _desktop = '%s@%s' % (user, display)
+
         if not _desktop in self._X2goClient__list_desktops(session_uuid):
-            raise x2go_exceptions.X2goDesktopSharingException('No such desktop ID: %s' % _desktop)
+            _orig_desktop = _desktop
+            _desktop = '%s.0' % _desktop
+            if not _desktop in self._X2goClient__list_desktops(session_uuid):
+                raise x2go_exceptions.X2goDesktopSharingException('No such desktop ID: %s' % _orig_desktop)
 
-        return self.session_registry(session_uuid).share_desktop(desktop=desktop, user=user, display=display, share_mode=share_mode, check_desktop_list=False)
+        return self.session_registry(session_uuid).share_desktop(desktop=_desktop, share_mode=share_mode, check_desktop_list=False)
     __share_desktop_session = share_desktop_session
 
     def resume_session(self, session_uuid=None, session_name=None):
diff --git a/x2go/session.py b/x2go/session.py
index e69f960..d4500d1 100644
--- a/x2go/session.py
+++ b/x2go/session.py
@@ -1092,13 +1092,29 @@ class X2goSession(object):
         self.terminal_session = 'PENDING'
 
         _desktop = desktop or '%s@%s' % (user, display)
-        if check_desktop_list and _desktop in self.list_desktops():
-            raise X2goDesktopSharingException('No such desktop ID: %s' % _desktop)
+        if check_desktop_list:
+            if not _desktop in self._X2goSession__list_desktops():
+                _orig_desktop = _desktop
+                _desktop = '%s.0' % _desktop
+                if not _desktop in self._X2GoSession__list_desktops():
+                    raise X2goDesktopSharingException('No such desktop ID: %s' % _orig_desktop)
+
+        _session_owner = _desktop.split('@')[0]
+        _display = _desktop.split('@')[1]
 
         if self.is_alive():
+            if self.get_username() != _session_owner:
+                self.logger('waiting for user ,,%s\'\' to interactively grant you access to his/her desktop session...' % _session_owner, loglevel=log.loglevel_NOTICE)
+                self.logger('THIS MAY TAKE A WHILE!', loglevel=log.loglevel_NOTICE)
+
             _control = self.control_session
-            self.terminal_session = _control.share_desktop(desktop=desktop, user=user, display=display, share_mode=share_mode,
-                                                           logger=self.logger, **self.terminal_params)
+            try:
+                self.terminal_session = _control.share_desktop(desktop=_desktop, share_mode=share_mode,
+                                                               logger=self.logger, **self.terminal_params)
+            except ValueError:
+                # x2gostartagent output parsing will result in a ValueError. This one we will catch
+                # here and change it into an X2goSessionException
+                raise X2goSessionException('the session on desktop %s is seemingly dead' % _desktop)
 
             if self.has_terminal_session():
                 self.session_name = self.terminal_session.session_info.name


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