The branch, master has been updated via 9e147d7aad30417c405de5621054f7a1503ccded (commit) via 086c072e295108806cb0b499885ef4d07fee1fec (commit) via e62710c866e0a6fde03337608ff7a4de5e633767 (commit) via 64280dccd8219d8d52713f319ad3a11543944ee3 (commit) from 991f0a1f718d54c71e4047fa9def3e401e1d8f7b (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 9e147d7aad30417c405de5621054f7a1503ccded Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Tue May 29 16:30:29 2012 +0200 Fix example file x2go_resume_session.py commit 086c072e295108806cb0b499885ef4d07fee1fec Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Tue May 29 16:00:17 2012 +0200 reintroduce compat X2goClient parameter ,,use_cache'' as alias for use_listsessions_cache commit e62710c866e0a6fde03337608ff7a4de5e633767 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Tue May 29 15:59:39 2012 +0200 bump upstream version towards 0.2.0.0 commit 64280dccd8219d8d52713f319ad3a11543944ee3 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Tue May 29 15:59:00 2012 +0200 update README/TODO file ----------------------------------------------------------------------- Summary of changes: README | 7 +++-- TODO | 2 +- debian/changelog | 4 +- examples/x2go_resume_session.py | 4 +- x2go/__init__.py | 50 +++++++++++++++++++++++++++----------- x2go/client.py | 7 ++++- 6 files changed, 49 insertions(+), 25 deletions(-) The diff of changes is: diff --git a/README b/README index e4af585..da4bc54 100644 --- a/README +++ b/README @@ -62,9 +62,10 @@ and wholeheartedness concerning this inner process. * sharing of local (client-side) folders (SFTP server is integrated in Python X2go) * connect via proxy SSH server * X2Go MIME box support -* desktop sharing (shadow sessions) * color depth auto-recognition - +* X2Go desktop sharing support +* X2Go published applications support +* Session window re-titling for desktop and shared desktop sessions === Installation === @@ -130,6 +131,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@das-netzwerkteam.de -light+love, 20110718 +light+love, 20120529 Mike Gabriel <mike.gabriel@das-netzwerkteam.de> diff --git a/TODO b/TODO index 39e674c..d6cf347 100644 --- a/TODO +++ b/TODO @@ -21,5 +21,5 @@ as of 20110701 To report bugs and ideas, please add your contributions and comments on http://code.x2go.org/ -light+love, 20110701 +light+love, 20120529 Mike Gabriel <mike.gabriel@das-netzwerkteam.de> diff --git a/debian/changelog b/debian/changelog index 89fff6d..0e7650f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,6 @@ -python-x2go (0.1.2.0-0~x2go1) UNRELEASED; urgency=low +python-x2go (0.2.0.0-0~x2go1) UNRELEASED; urgency=low - *New upstream version (0.1.2.0) + *New upstream version (0.2.0.0) - License change upstream: GPLv3+ -> AGPLv3+ - Add support for session window title renaming. - Add support for bringing session windows on top. diff --git a/examples/x2go_resume_session.py b/examples/x2go_resume_session.py index 5fdb29a..2afc739 100644 --- a/examples/x2go_resume_session.py +++ b/examples/x2go_resume_session.py @@ -27,7 +27,7 @@ import x2go import getpass import os,sys -import time +import gevent import paramiko # modify to your needs... @@ -50,7 +50,7 @@ if avail_sessions: try: while cli.session_ok(s_uuid): - time.sleep(1) + gevent.sleep(2) except KeyboardInterrupt: pass diff --git a/x2go/__init__.py b/x2go/__init__.py index 302ccd3..bc0a776 100644 --- a/x2go/__init__.py +++ b/x2go/__init__.py @@ -36,16 +36,16 @@ API Concept compatible with former versions of the same library. This is intended for Python X2Go, but with some restraints. - Python X2Go only offers 5 public API classes. With the release of - version 0.1.0.0, we will try to keep these 5 public API classes + Python X2Go only offers five public API classes. With the release of + version 0.1.0.0, we will try to keep these five public API classes of future releases as compatible as possible with versions of Python X2go greater/equal than v0.1.0.0. - The 4 public API classes are: + The five public API classes are: - L{X2goClient} --- a whole X2Go client API - L{X2goSession} --- management of an individual X2Go - session started from an L{X2goClient} instance + session--either started standalone or from within an L{X2goClient} instance - L{X2goClientSettings} --- provide access to X2Go (global and user) configuration node »settings« - L{X2goClientPrinting} --- provide access to X2Go (global and @@ -53,9 +53,14 @@ API Concept - L{X2goSessionProfiles} --- provide access to X2Go (global and user) configuration node »sessions« + Plus two extra classes on MS Windows platforms: + + - L{X2goClientXConfig} and L{X2goXServer} --- these classes will be initialized + during L{X2goClient} instantiation on MS Windows platforms and start an installed XServer + Any other of the Python X2Go classes may be subject to internal changes and the way of addressing these classes in code may vary between different - versions of Python X2Go. If you directly use other than the 5 public API + versions of Python X2Go. If you directly use other than the five public API classes in your own applications, so please be warned. @@ -70,8 +75,14 @@ API Structure ... + Python X2Go is capable of handling multiple running/suspended sessions within the + same client instance, so for your application, there should not be any need of + instantiating more than one L{X2goClient} object in parallel. + + NOTE: Doing so is--herewith--fully disrecommended. + The L{X2goClient} class flattens the complex structure of Python X2Go into - many L{X2goClient} methods that you can use in your own C{MyX2goClient} instances. + many L{X2goClient} methods that you can use in your own C{MyX2goClient} instance. However, it might be handy to retrieve a whole X2Go session instance from the L{X2goClient} instance. This can be achieved by the @@ -97,13 +108,20 @@ API Structure pw=getpass.getpass() # authenticate reg_session_instance.connect(password=pw, <further_options>) - # launch the session window - reg_session_instance.start() - # or resume the youngest session for + # then launch the session window with either a new session + if start: + reg_session_instance.start() + # or resume a session + if resume: + reg_session_instance.resume(session_name=<X2Go-session-name>) + # leave it runnint for 60 seconds gevent.sleep(60) - reg_session_instance.suspend() - # or alternatively: - reg_session_instance.terminate() + # and then suspend + if suspend: + reg_session_instance.suspend() + # or alternatively terminate it + elif terminate: + reg_session_instance.terminate() How to access---especially how to modify---the X2Go client configuration files »settings«, »printing«, »sessions« and »xconfig« (Windows only) @@ -111,6 +129,7 @@ API Structure Please refer to the class docs of L{X2goClientSettings}, L{X2goClientPrinting}, L{X2goSessionProfiles} and L{X2goXServer}. + Configuration and Session Management ==================================== @@ -136,7 +155,7 @@ Configuration and Session Management change your X2Go client's print setup during a running session - L{X2goClientSettings}: also the configuration node »settings« is re-read whenever needed in the course of X2Go session management - - L{X2goXServer} (Windows only): this class will only be initialized + - L{X2goClientXConfig} and L{X2goXServer} (Windows only): these classes will only be initialized once (starting the XServer on Windows platforms) on construction of an L{X2goClient} instance @@ -144,7 +163,7 @@ Dependencies ============ Python X2Go takes advantage of the libevent/greenlet implementation gevent (http://www.gevent.org). The least needed version of Python gevent - is 0.13.0 (or above). + is 0.13.0. On MS Windows Python gevent 1.0 is highly recommended. Python X2Go (because of gevent) requires at least Python 2.6. Further recent information on Python X2Go is available at: @@ -155,10 +174,11 @@ Contact If you have any questions concerning Python X2Go, please sign up for the x2go-dev list (https://lists.berlios.de/mailman/listinfo/x2go-dev) and post your questions, requests and feedbacks there. + """ __NAME__ = 'python-x2go' -__VERSION__ = '0.1.2.0' +__VERSION__ = '0.2.0.0' from gevent import monkey monkey.patch_all() diff --git a/x2go/client.py b/x2go/client.py index 9585253..94e5c7d 100644 --- a/x2go/client.py +++ b/x2go/client.py @@ -193,6 +193,7 @@ class X2goClient(object): ssh_rootdir=None, start_xserver=False, start_pulseaudio=False, + use_cache=False, use_listsessions_cache=False, auto_update_listsessions_cache=False, auto_update_listdesktops_cache=False, @@ -229,6 +230,8 @@ class X2goClient(object): @type start_xserver: C{bool} @param start_pulseaudio: start Pulseaudio daemon when registering an L{X2goClient} instance @type start_pulseaudio: C{bool} + @param use_cache: alias for C{use_listsessions_cache} + @type use_cache: C{bool} @param use_listsessions_cache: activate the X2Go session list cache in (L{X2goListSessionsCache}) @type use_listsessions_cache: C{bool} @param auto_update_listsessions_cache: activate automatic updates of the X2Go session list cache (L{X2goListSessionsCache}) @@ -344,7 +347,7 @@ class X2goClient(object): self.auto_register_sessions = auto_register_sessions self.session_registry = X2goSessionRegistry(self, logger=self.logger) - self.session_guardian = X2goSessionGuardian(self, auto_update_listsessions_cache=auto_update_listsessions_cache & use_listsessions_cache, + self.session_guardian = X2goSessionGuardian(self, auto_update_listsessions_cache=auto_update_listsessions_cache & (use_listsessions_cache|use_cache), auto_update_listdesktops_cache=auto_update_listdesktops_cache & use_listsessions_cache, auto_update_listmounts_cache=auto_update_listmounts_cache & use_listsessions_cache, auto_update_sessionregistry=auto_update_sessionregistry, @@ -357,7 +360,7 @@ class X2goClient(object): if use_listsessions_cache: self.listsessions_cache = X2goListSessionsCache(self, logger=self.logger) - self.use_listsessions_cache = use_listsessions_cache + self.use_listsessions_cache = use_listsessions_cache | use_cache self.auto_update_listsessions_cache = auto_update_listsessions_cache self.auto_update_listdesktops_cache = auto_update_listdesktops_cache self.auto_update_listmounts_cache = auto_update_listmounts_cache 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).