[X2Go-Commits] python-x2go.git - build-baikal (branch) updated: 0.0.36.1-39-g580436d
X2Go dev team
git-admin at x2go.org
Wed Jan 8 15:26:00 CET 2014
The branch, build-baikal has been updated
via 580436d5f8210a4c60574e59c31af5831288a340 (commit)
from a7c90dab10f41d9ecc56011924ed8ea148f81400 (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/backends/terminal/_stdout.py | 20 ++++++++++++++++++--
x2go/session.py | 7 +++++--
2 files changed, 23 insertions(+), 4 deletions(-)
The diff of changes is:
diff --git a/x2go/backends/terminal/_stdout.py b/x2go/backends/terminal/_stdout.py
index e68cd2b..567f332 100644
--- a/x2go/backends/terminal/_stdout.py
+++ b/x2go/backends/terminal/_stdout.py
@@ -510,6 +510,13 @@ class X2goTerminalSessionSTDOUT(object):
if self.print_queue is not None:
self.print_queue.pause()
+ def get_printing_spooldir(self):
+ """\
+ Return the server-side printing spooldir path.
+
+ """
+ return '%s/%s' % (self.session_info.remote_container, 'spool')
+
def start_dropbox(self, dropbox_extensions=[], dropbox_action=None):
"""\
Initialize X2go dropbox handling.
@@ -545,6 +552,13 @@ class X2goTerminalSessionSTDOUT(object):
if self.dropbox_queue is not None:
self.dropbox_queue.pause()
+ def get_dropbox_spooldir(self):
+ """\
+ Return the server-side dropbox spooldir path.
+
+ """
+ return '%s/%s' % (self.session_info.remote_container, 'dropbox')
+
def share_local_folder(self, folder_name=None, folder_type='disk'):
"""\
Share a local folder with the X2go session.
@@ -668,7 +682,7 @@ class X2goTerminalSessionSTDOUT(object):
else:
return False
- def run_command(self, cmd=None):
+ def run_command(self, cmd=None, env={}):
"""\
Run a command in this session.
@@ -715,7 +729,9 @@ class X2goTerminalSessionSTDOUT(object):
if self.params.snd_system == 'pulse':
cmd_line = [ 'PULSE_CLIENTCONFIG=%s/.pulse-client.conf' % self.session_info.remote_container ] + cmd_line
- if self.
+ if env:
+ for env_var in env.keys():
+ cmd_line = [ '%s=%s' % (env_var, env[env_var]) ] + cmd_line
(stdin, stdout, stderr) = self.control_session._x2go_exec_command(cmd_line)
diff --git a/x2go/session.py b/x2go/session.py
index 4978727..66fb9bf 100644
--- a/x2go/session.py
+++ b/x2go/session.py
@@ -155,6 +155,8 @@ class X2goSession(object):
self.sshproxy_params = {}
self.update_params(params)
+ self.session_environment = {}
+
try: del self.control_params['server']
except: pass
@@ -641,7 +643,6 @@ class X2goSession(object):
if SUPPORTED_SOUND and _terminal.params.snd_system is not 'none':
_terminal.start_sound()
-
if (SUPPORTED_PRINTING and self.printing) or \
(SUPPORTED_DROPBOX and self.allow_dropbox) or \
(SUPPORTED_FOLDERSHARING and self.allow_share_local_folders):
@@ -650,11 +651,13 @@ class X2goSession(object):
try:
if SUPPORTED_PRINTING and self.printing:
_terminal.start_printing()
+ self.session_environment.update({'X2GO_SPOOLDIR': _terminal.get_printing_spooldir(), })
except X2goUserException:
pass
if SUPPORTED_DROPBOX and self.allow_dropbox:
_terminal.start_dropbox(dropbox_extensions=self.dropbox_extensions, dropbox_action=self.dropbox_action)
+ self.session_environment.update({'X2GO_DROPBOX': _terminal.get_dropbox_spooldir(), })
if SUPPORTED_FOLDERSHARING and self.share_local_folders:
if _control.get_transport().reverse_tunnels[_terminal.get_session_name()]['sshfs'][1] is not None:
@@ -663,7 +666,7 @@ class X2goSession(object):
# only run the session startup command if we do not resume...
if _new_session:
- self.terminal_session.run_command()
+ self.terminal_session.run_command(env=self.session_environment)
self.virgin = False
self.suspended = False
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