The branch, master has been updated
via c23d9f46f3b6fd8c4155db7af689e15f76096a24 (commit)
from ef4ae509162b4b5a13c319e7e87e584f3837b53b (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 c23d9f46f3b6fd8c4155db7af689e15f76096a24
Author: Mike Gabriel <mike.gabriel(a)das-netzwerkteam.de…
[View More]>
Date: Wed Apr 18 18:25:37 2012 +0200
Provide X2goSession.get_session_type() method.
-----------------------------------------------------------------------
Summary of changes:
debian/changelog | 1 +
x2go/backends/terminal/_stdout.py | 7 +++++++
x2go/session.py | 18 ++++++++++++++++++
3 files changed, 26 insertions(+), 0 deletions(-)
The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 2b9f7cb..8bdba1c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -111,6 +111,7 @@ python-x2go (0.1.2.0-0~x2go1) UNRELEASED; urgency=low
around faulty abortion of client implementations.
- Handle detection of free TCP/IP X display port far more intelligently.
- On unused port detection bind to 127.0.0.1 by default.
+ - Provide X2goSession.get_session_type() method.
* Depend on python-xlib.
-- Mike Gabriel <mike.gabriel(a)das-netzwerkteam.de> Sat, 28 Sep 2012 01:44:21 +0100
diff --git a/x2go/backends/terminal/_stdout.py b/x2go/backends/terminal/_stdout.py
index 9e9b801..095445e 100644
--- a/x2go/backends/terminal/_stdout.py
+++ b/x2go/backends/terminal/_stdout.py
@@ -407,6 +407,13 @@ class X2goTerminalSessionSTDOUT(object):
"""
return self.params.cmd
+ def get_session_type(self)
+ """\
+ STILL UNDOCUMENTED
+
+ """
+ return self.session_type
+
def start_sound(self):
"""\
Initialize Paramiko/SSH reverse forwarding tunnel for X2Go sound.
diff --git a/x2go/session.py b/x2go/session.py
index d3d7d9e..3e134d8 100644
--- a/x2go/session.py
+++ b/x2go/session.py
@@ -791,6 +791,24 @@ class X2goSession(object):
return None
__get_session_cmd = get_session_cmd
+ def get_session_type(self):
+ """\
+ Retrieve the session type of a session (R, D, S or P).
+
+ R: rootless session
+ D: desktop session
+ S: shadow session
+ P: session in published applications mode
+
+ @return: session type
+ @rtype: C{str}
+
+ """
+ if self.has_terminal_session():
+ return self.terminal_session.get_session_type()
+ else:
+ return None
+
def get_session_title(self):
"""\
Retrieve the session window title of this
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).
[View Less]
The branch, master has been updated
via 3bdee1820a55752899982778a828e1b912786df2 (commit)
from c3eefb060d951a15a0362b7fe9ffc03b736ba849 (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 3bdee1820a55752899982778a828e1b912786df2
Author: Mike Gabriel <mike.gabriel(a)das-netzwerkteam.de…
[View More]>
Date: Wed Apr 18 18:25:08 2012 +0200
use detected session type instead of configured session command
-----------------------------------------------------------------------
Summary of changes:
pyhoca/wxgui/menus_taskbar.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
The diff of changes is:
diff --git a/pyhoca/wxgui/menus_taskbar.py b/pyhoca/wxgui/menus_taskbar.py
index be1c82c..fcd35f4 100644
--- a/pyhoca/wxgui/menus_taskbar.py
+++ b/pyhoca/wxgui/menus_taskbar.py
@@ -246,7 +246,7 @@ class PyHocaGUI_Menu_TaskbarSessionActions(wx.Menu):
_rmi = self.Append(text=_(u"Refresh menu tree"), id=ID_REFRESHMENU)
if _s is not None and \
- _s.get_session_cmd() in x2go.defaults.X2GO_DESKTOPSESSIONS and \
+ _s.get_session_type() in ('D', 'S') and \
not _s.is_published_applications_provider() and \
_session_status == 'R' and \
_s in self._PyHocaGUI.client_associated_sessions_of_profile_name(profile_name, return_objects=True):
hooks/post-receive
--
pyhoca-gui.git (Python X2Go Client (wxPython GUI))
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 "pyhoca-gui.git" (Python X2Go Client (wxPython GUI)).
[View Less]
The branch, master has been updated
via ef4ae509162b4b5a13c319e7e87e584f3837b53b (commit)
from ac5b31be15371c87eb335b54df50fe277000d580 (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 ef4ae509162b4b5a13c319e7e87e584f3837b53b
Author: Mike Gabriel <mike.gabriel(a)das-netzwerkteam.de…
[View More]>
Date: Wed Apr 18 17:25:13 2012 +0200
finally fix last 2-3 commits
-----------------------------------------------------------------------
Summary of changes:
x2go/client.py | 2 ++
x2go/xserver.py | 13 +++++++++----
2 files changed, 11 insertions(+), 4 deletions(-)
The diff of changes is:
diff --git a/x2go/client.py b/x2go/client.py
index 468ce08..e371471 100644
--- a/x2go/client.py
+++ b/x2go/client.py
@@ -325,9 +325,11 @@ class X2goClient(object):
# FIXME: this trick is nasty, client implementation should rather cleanly shutdown launch X-server processes
#
# re-use a left behind X-server instance of a previous/crashed run of Python X2Go Client
+ self.logger('found a running (and maybe stray) X-server, trying to re-use it on X DISPLAY port: %s' % _last_display, loglevel=log.loglevel_WARN)
os.environ.update({'DISPLAY': str(_last_display)})
else:
# presume the running XServer listens on :0
+ self.logger('using fallback display for X-server: localhost:0', loglevel=log.loglevel_WARN)
os.environ.update({'DISPLAY': 'localhost:0'})
if _X2GOCLIENT_OS == 'Windows' and start_pulseaudio:
diff --git a/x2go/xserver.py b/x2go/xserver.py
index c97c2ee..ee29d5c 100644
--- a/x2go/xserver.py
+++ b/x2go/xserver.py
@@ -226,7 +226,12 @@ class X2goClientXConfig(inifiles.X2goIniFile):
# if the port changed, let's write it to our configuration file
if _detect_xserver_port != _last_xserver_port:
- self.update_value(xserver_name, 'last_display', _last_display.replace(_last_xserver_port, _detect_xserver_port))
+ _new_display = _last_display.replace(str(_last_xserver_port -6000), str(_detect_xserver_port -6000))
+ self.logger('cannot used configured X DISPLAY, the new available DISPLAY port %s has been detected' % _new_display, loglevel=log.loglevel_NOTICE)
+ self.update_value(xserver_name, 'last_display', _new_display)
+ _parameters = self.get_value(xserver_name, 'parameters')
+ _parameters[0] = ":%s" % (_detect_xserver_port -6000)
+ self.update_value(xserver_name, 'parameters', tuple(_parameters))
self.write_user_config = True
self.write()
@@ -275,10 +280,10 @@ class X2goXServer(threading.Thread):
self.xserver_config = xserver_config
self.hProcess = None
- if self.xserver_config.has_key('display'):
+ if self.xserver_config.has_key('last_display'):
- self.logger('setting DISPLAY environment variable to %s' % self.xserver_config['display'], loglevel=log.loglevel_NOTICE)
- os.environ.update({'DISPLAY': str(self.xserver_config['display'])})
+ self.logger('setting DISPLAY environment variable to %s' % self.xserver_config['last_display'], loglevel=log.loglevel_NOTICE)
+ os.environ.update({'DISPLAY': str(self.xserver_config['last_display'])})
threading.Thread.__init__(self)
self.daemon = True
self.start()
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).
[View Less]
The branch, master has been updated
via ac5b31be15371c87eb335b54df50fe277000d580 (commit)
from 5fd75e3eb8928b85866c6ccb97fd9d43c67f1f5e (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 ac5b31be15371c87eb335b54df50fe277000d580
Author: Mike Gabriel <mike.gabriel(a)das-netzwerkteam.de…
[View More]>
Date: Wed Apr 18 16:22:19 2012 +0200
On unused port detection bind to 127.0.0.1 by default.
-----------------------------------------------------------------------
Summary of changes:
debian/changelog | 1 +
x2go/backends/proxy/base.py | 2 +-
x2go/utils.py | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)
The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index fa200d6..2b9f7cb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -110,6 +110,7 @@ python-x2go (0.1.2.0-0~x2go1) UNRELEASED; urgency=low
a previous instance of Python X2Go Client. This trick is nasty, but works
around faulty abortion of client implementations.
- Handle detection of free TCP/IP X display port far more intelligently.
+ - On unused port detection bind to 127.0.0.1 by default.
* Depend on python-xlib.
-- Mike Gabriel <mike.gabriel(a)das-netzwerkteam.de> Sat, 28 Sep 2012 01:44:21 +0100
diff --git a/x2go/backends/proxy/base.py b/x2go/backends/proxy/base.py
index c507c55..0c1586c 100644
--- a/x2go/backends/proxy/base.py
+++ b/x2go/backends/proxy/base.py
@@ -180,7 +180,7 @@ class X2goProxyBASE(threading.Thread):
local_graphics_port += 10000
except socket.error:
raise x2go_exceptions.X2goControlSessionException('The control session has died unexpectedly.')
- local_graphics_port = utils.detect_unused_port(bind_address='', preferred_port=local_graphics_port)
+ local_graphics_port = utils.detect_unused_port(preferred_port=local_graphics_port)
self.fw_tunnel = forward.start_forward_tunnel(local_port=local_graphics_port,
remote_port=self.session_info.graphics_port,
diff --git a/x2go/utils.py b/x2go/utils.py
index e367881..cb8637a 100644
--- a/x2go/utils.py
+++ b/x2go/utils.py
@@ -354,7 +354,7 @@ def patiently_remove_file(dirname, filename):
# file is probably locked
gevent.sleep(5)
-def detect_unused_port(bind_address='', preferred_port=None):
+def detect_unused_port(bind_address='127.0.0.1', preferred_port=None):
"""\
Detect an unused IP socket.
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).
[View Less]
The branch, master has been updated
via 5fd75e3eb8928b85866c6ccb97fd9d43c67f1f5e (commit)
from 392629ed845770798e10870494951c64f4e86aca (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 5fd75e3eb8928b85866c6ccb97fd9d43c67f1f5e
Author: Mike Gabriel <mike.gabriel(a)das-netzwerkteam.de…
[View More]>
Date: Wed Apr 18 16:14:37 2012 +0200
fix syntax and attribute errors
-----------------------------------------------------------------------
Summary of changes:
x2go/client.py | 2 +-
x2go/xserver.py | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
The diff of changes is:
diff --git a/x2go/client.py b/x2go/client.py
index a5c4e63..468ce08 100644
--- a/x2go/client.py
+++ b/x2go/client.py
@@ -307,7 +307,7 @@ class X2goClient(object):
p_xs_name = self.client_xconfig.preferred_xserver_names[0]
_last_display = self.client_xconfig.get_xserver_config(p_xs_name)['last_display']
self.client_xconfig.detect_unused_xdisplay_port(p_xs_name)
- p_xs = self.client_xconfig.get_xserver_config(p_xs_name)
+ p_xs = (p_xs_name, self.client_xconfig.get_xserver_config(p_xs_name))
elif type(start_xserver) is types.StringType:
_last_display = self.client_xconfig.get_xserver_config(start_xserver)['last_display']
self.client_xconfig.detect_unused_xdisplay_port(start_xserver)
diff --git a/x2go/xserver.py b/x2go/xserver.py
index 859b1c8..c97c2ee 100644
--- a/x2go/xserver.py
+++ b/x2go/xserver.py
@@ -203,10 +203,10 @@ class X2goClientXConfig(inifiles.X2goIniFile):
"""
_default_display = self.get_xserver_config(xserver_name)['display']
- _last_display = self.xserver_config(xserver_name)['last_display']
+ _last_display = self.get_xserver_config(xserver_name)['last_display']
try:
- _default_xserver_port = int(_display.split(":")[1].split(".")[0]) + 6000
+ _default_xserver_port = int(_default_display.split(":")[1].split(".")[0]) + 6000
_last_xserver_port = int(_last_display.split(":")[1].split(".")[0]) + 6000
# try the last used $DISPLAY first...
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).
[View Less]
The branch, master has been updated
via 98ba5f24c29ce9ac2ae4129b2ade74dbb515cd21 (commit)
from 38a2aa49b61bb51a1fbcb700de9bf1d58560e0d1 (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 98ba5f24c29ce9ac2ae4129b2ade74dbb515cd21
Author: Mike Gabriel <mike.gabriel(a)das-netzwerkteam.de…
[View More]>
Date: Wed Apr 18 10:36:47 2012 +0200
os.environ elements can only be strings
-----------------------------------------------------------------------
Summary of changes:
x2go/client.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
The diff of changes is:
diff --git a/x2go/client.py b/x2go/client.py
index 3968bb1..4ee4c00 100644
--- a/x2go/client.py
+++ b/x2go/client.py
@@ -319,7 +319,7 @@ class X2goClient(object):
# FIXME: this trick is nasty, client implementation should rather cleanly shutdown launch X-server processes
#
# re-use a left behind X-server instance of a previous/crashed run of Python X2Go Client
- os.environ.update({'DISPLAY': p_xs[1]['display']})
+ os.environ.update({'DISPLAY': str(p_xs[1]['display'])})
else:
# presume the running XServer listens on :0
os.environ.update({'DISPLAY': 'localhost:0'})
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).
[View Less]
The branch, master has been updated
via 38a2aa49b61bb51a1fbcb700de9bf1d58560e0d1 (commit)
from 393c1297895e723167977505e45df18e4f903b5a (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 38a2aa49b61bb51a1fbcb700de9bf1d58560e0d1
Author: Mike Gabriel <mike.gabriel(a)das-netzwerkteam.de…
[View More]>
Date: Wed Apr 18 10:30:53 2012 +0200
Re-use a left behind stray X-server that might have not get killed by a previous instance of Python X2Go Client. This trick is nasty, but works around faulty abortion of client implementations.
-----------------------------------------------------------------------
Summary of changes:
debian/changelog | 3 +++
x2go/client.py | 27 +++++++++++++++++++++------
x2go/xserver.py | 2 +-
3 files changed, 25 insertions(+), 7 deletions(-)
The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 1042ea1..87e643a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -106,6 +106,9 @@ python-x2go (0.1.2.0-0~x2go1) UNRELEASED; urgency=low
the next available display number.
- Make transitions of master sessions more robust. Only allow local folder sharing for
running sessions.
+ - Re-use a left behind stray X-server that might have not get killed by
+ a previous instance of Python X2Go Client. This trick is nasty, but works
+ around faulty abortion of client implementations.
* Depend on python-xlib.
-- Mike Gabriel <mike.gabriel(a)das-netzwerkteam.de> Sat, 28 Sep 2012 01:44:21 +0100
diff --git a/x2go/client.py b/x2go/client.py
index c64259e..3968bb1 100644
--- a/x2go/client.py
+++ b/x2go/client.py
@@ -292,22 +292,37 @@ class X2goClient(object):
self.client_printing = self.printing_backend(client_instance=self, logger=self.logger)
if _X2GOCLIENT_OS == 'Windows' and start_xserver:
+
if self.client_rootdir:
self.client_xconfig = X2goClientXConfig(config_files=[_xconfig_config_file], logger=self.logger)
else:
self.client_xconfig = X2goClientXConfig(logger=self.logger)
+
if not self.client_xconfig.known_xservers:
self.HOOK_no_known_xserver_found()
- elif not self.client_xconfig.running_xservers:
+ else:
+
if type(start_xserver) is types.BooleanType:
p_xs = self.client_xconfig.preferred_xserver
elif type(start_xserver) is types.StringType:
p_xs = (start_xserver, self.client_xconfig.get_xserver_config(start_xserver))
- if p_xs is not None:
- self.xserver = X2goXServer(p_xs[0], p_xs[1], logger=self.logger)
- else:
- # presume the running XServer listens on :0
- os.environ.update({'DISPLAY': 'localhost:0'})
+
+ if not self.client_xconfig.running_xservers:
+
+ if p_xs is not None:
+ self.xserver = X2goXServer(p_xs[0], p_xs[1], logger=self.logger)
+
+ else:
+
+ if p_xs is not None:
+ #
+ # FIXME: this trick is nasty, client implementation should rather cleanly shutdown launch X-server processes
+ #
+ # re-use a left behind X-server instance of a previous/crashed run of Python X2Go Client
+ os.environ.update({'DISPLAY': p_xs[1]['display']})
+ else:
+ # presume the running XServer listens on :0
+ os.environ.update({'DISPLAY': 'localhost:0'})
if _X2GOCLIENT_OS == 'Windows' and start_pulseaudio:
self.pulseaudio = X2goPulseAudio(path=self.pulseaudio_installdir, client_instance=self, logger=self.logger)
diff --git a/x2go/xserver.py b/x2go/xserver.py
index 0ed3476..b2b5a37 100644
--- a/x2go/xserver.py
+++ b/x2go/xserver.py
@@ -178,7 +178,7 @@ class X2goClientXConfig(inifiles.X2goIniFile):
Renders a list of preferred XServer names (most preferred on top).
"""
- if self.xserver_launch_possible and self.xserver_launch_needed:
+ if self.xserver_launch_possible:
return (self.installed_xservers[0], self.get_xserver_config(self.installed_xservers[0]))
else:
return None
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).
[View Less]