[X2Go-Commits] python-x2go.git - build-baikal (branch) updated: 99b5cd7f9ec27f57b8779e941ebf7a8be040f516
X2Go dev team
git-admin at x2go.org
Wed Jan 8 15:25:19 CET 2014
The branch, build-baikal has been updated
via 99b5cd7f9ec27f57b8779e941ebf7a8be040f516 (commit)
from d0258dd143bfb03489bab74618b36d627cbadb35 (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:
x2go/proxy.py | 35 ++++++++++++++++++++++++-----------
1 file changed, 24 insertions(+), 11 deletions(-)
The diff of changes is:
diff --git a/x2go/proxy.py b/x2go/proxy.py
index 20cf0b3..42beb50 100644
--- a/x2go/proxy.py
+++ b/x2go/proxy.py
@@ -163,11 +163,20 @@ class X2goProxy(threading.Thread):
# update the proxy port in PROXY_ARGS
self._update_local_proxy_socket(local_graphics_port)
+ if len(self.PROXY_OPTIONS) >= 250:
+ _options_filename = os.path.join(self.session_info.local_container, 'options')
+ options = os.open(_options_filename, w)
+ options.write(','.join(self.PROXY_OPTIONS))
+ options.close()
+ self.PROXY_OPTIONS= [ 'nx/nx', 'options=%s' % (_options_filename), ]
+
cmd_line = [ self.PROXY_CMD, ]
- cmd_line.extend(self.PROXY_ARGS)
+ cmd_line.append(self.PROXY_MODE)
+ _proxy_options = "%s:%s" % (",".join(self.PROXY_OPTIONS), self.PROXY_DISPLAY)
+ cmd_line.append(_proxy_options)
+
# resume sessions needs a fraction of time for the forward_tunnel to be created...
# TODO: call some code that checks if the tunnel is already up...
- gevent.sleep(2)
self.session_log_stdout = open('%s/%s' % (self.session_info.local_container, self.session_log, ), 'a')
self.session_log_stderr = open('%s/%s' % (self.session_info.local_container, self.session_log, ), 'a')
self.logger('forking threaded subprocess: %s' % " ".join(cmd_line), log.loglevel_DEBUG)
@@ -222,19 +231,23 @@ class X2goNX3Proxy(X2goProxy):
self.PROXY_ENV.update({
"NX_CLIENT" : "/bin/true",
})
- print 'HALLO: %s' % self.session_info.local_container
- self.PROXY_ARGS = ["-S",
- "nx/nx,root='%s',retry=5," % self.session_info.local_container +
- "composite=1,connect=localhost," +
- "cookie=%s," % self.session_info.cookie +
- "port=%d," % self.session_info.graphics_port +
- "errors='%s'" % os.path.join(self.session_info.local_container, self.session_log, ),
+ self.PROXY_MODE = '-S'
+ self.PROXY_OPTIONS = [
+ "nx/nx" ,
+ "root=%s" % self.session_info.local_container,
+ "retry=5",
+ "composite=1",
+ "connect=localhost",
+ "cookie=%s" % self.session_info.cookie,
+ "port=%d" % self.session_info.graphics_port,
+ "errors=%s" % os.path.join(self.session_info.local_container, self.session_log, ),
]
+ self.PROXY_DISPLAY = self.session_info.display
def _update_local_proxy_socket(self, port):
- for idx, a in enumerate(self.PROXY_ARGS):
+ for idx, a in enumerate(self.PROXY_OPTIONS):
if a.startswith('port='):
- self.PROXY_ARGS[idx] = port
+ self.PROXY_OPTIONS[idx] = 'port=%s' % port
def start_proxy(self):
self.logger('starting local NX3 proxy...', loglevel=log.loglevel_INFO)
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