[X2Go-Commits] python-x2go.git - release/0.4.0.x (branch) updated: 736c25e842dbcede08ca7ab429795fc7d0853f52
X2Go dev team
git-admin at x2go.org
Tue Jan 7 16:16:17 CET 2014
The branch, release/0.4.0.x has been updated
via 736c25e842dbcede08ca7ab429795fc7d0853f52 (commit)
from 7394717c2c27e0d0d667cddc9e27de4035083c54 (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 | 50 +++++++++++++++++++++----------------
x2go/session.py | 3 ++-
x2go/utils.py | 2 +-
3 files changed, 31 insertions(+), 24 deletions(-)
The diff of changes is:
diff --git a/x2go/backends/terminal/_stdout.py b/x2go/backends/terminal/_stdout.py
index 4726654..ea5dc88 100644
--- a/x2go/backends/terminal/_stdout.py
+++ b/x2go/backends/terminal/_stdout.py
@@ -222,7 +222,7 @@ class X2goTerminalSessionSTDOUT(object):
def __init__(self, control_session, session_info=None,
geometry="800x600", depth=24, link="adsl", pack="16m-jpeg-9",
cache_type="unix-kde", kblayout='us', kbtype='pc105/us',
- session_type="application", snd_system='pulse', cmd=None,
+ session_type="application", snd_system='pulse', snd_port=4713, cmd=None,
rdp_server=None, rdp_options=None,
xdmcp_server=None,
convert_encoding=False, server_encoding='UTF-8', client_encoding='UTF-8',
@@ -266,24 +266,24 @@ class X2goTerminalSessionSTDOUT(object):
self.params = X2goSessionParams()
- self.params.geometry = geometry
+ self.params.geometry = str(geometry)
self.params.depth = str(depth)
- self.params.link = link
- self.params.pack = pack
- self.params.cache_type = cache_type
- self.params.session_type = session_type
- self.params.kblayout = kblayout
- self.params.kbtype = kbtype
- self.params.snd_system = snd_system
- self.params.cmd = cmd
-
- self.params.rdp_server = rdp_server
- self.params.rdp_options = rdp_options
- self.params.xdmcp_server = xdmcp_server
+ self.params.link = str(link)
+ self.params.pack = str(pack)
+ self.params.cache_type = str(cache_type)
+ self.params.session_type = str(session_type)
+ self.params.kblayout = str(kblayout)
+ self.params.kbtype = str(kbtype)
+ self.params.snd_system = str(snd_system)
+ self.params.cmd = str(cmd)
+
+ self.params.rdp_server = str(rdp_server)
+ self.params.rdp_options = str(rdp_options)
+ self.params.xdmcp_server = str(xdmcp_server)
self.params.convert_encoding = convert_encoding
- self.params.client_encoding = client_encoding
- self.params.server_encoding = server_encoding
+ self.params.client_encoding = str(client_encoding)
+ self.params.server_encoding = str(server_encoding)
self.params.rootdir = (type(rootdir) is types.StringType) and rootdir or self.sessions_rootdir
self.params.update()
@@ -291,6 +291,7 @@ class X2goTerminalSessionSTDOUT(object):
self.profile_name = profile_name
self.proxy_class = proxy_backend
+ self.snd_port = snd_port
self.print_action = print_action
self.print_action_args = print_action_args
self.printing_backend = printing_backend
@@ -386,7 +387,7 @@ class X2goTerminalSessionSTDOUT(object):
# start reverse SSH tunnel for pulse stream
_tunnel = rforward.X2goRevFwTunnel(server_port=self.session_info.snd_port,
remote_host='localhost',
- remote_port=4713,
+ remote_port=self.snd_port,
ssh_transport=self.control_session.get_transport(),
session_instance=self.session_instance,
logger=self.logger
@@ -412,7 +413,7 @@ class X2goTerminalSessionSTDOUT(object):
# start reverse SSH tunnel for pulse stream
_tunnel = rforward.X2goRevFwTunnel(server_port=self.session_info.snd_port,
remote_host='localhost',
- remote_port=16001,
+ remote_port=self.snd_port,
ssh_transport=self.control_session.get_transport(),
session_instance=self.session_instance,
logger=self.logger
@@ -610,7 +611,7 @@ class X2goTerminalSessionSTDOUT(object):
else:
export_iconv_settings = ''
- if folder_type is 'disk':
+ if folder_type == 'disk':
cmd_line = [ '%s export HOSTNAME &&' % export_iconv_settings,
'x2gomountdirs',
@@ -622,7 +623,7 @@ class X2goTerminalSessionSTDOUT(object):
'rm -f %s %s.ident' % (_x2go_key_fname, _x2go_key_fname),
]
- elif folder_type is 'spool':
+ elif folder_type == 'spool':
cmd_line = [ '%s export HOSTNAME &&' % export_iconv_settings,
'x2gomountdirs',
@@ -634,7 +635,7 @@ class X2goTerminalSessionSTDOUT(object):
'rm -f %s %s.ident' % (_x2go_key_fname, _x2go_key_fname),
]
- elif folder_type is 'dropbox':
+ elif folder_type == 'dropbox':
cmd_line = [ '%s export HOSTNAME &&' % export_iconv_settings,
'x2gomountdirs',
@@ -713,9 +714,14 @@ class X2goTerminalSessionSTDOUT(object):
str(self.params.session_type),
">& /dev/null & exit",
]
- if self.params.snd_system is 'pulse':
+
+ print 'SOUNDSYSTEM: %s' % self.params.snd_system
+
+ if self.params.snd_system == 'pulse':
cmd_line = [ 'PULSE_CLIENTCONFIG=%s/.pulse-client.conf' % self.session_info.remote_container ] + cmd_line
+ print cmd_line
+
(stdin, stdout, stderr) = self.control_session._x2go_exec_command(cmd_line)
return stdout.read(), stderr.read()
diff --git a/x2go/session.py b/x2go/session.py
index fdde85b..ee81ce0 100644
--- a/x2go/session.py
+++ b/x2go/session.py
@@ -54,7 +54,8 @@ from defaults import SUPPORTED_SOUND, SUPPORTED_PRINTING, SUPPORTED_FOLDERSHARIN
# options of the paramiko.SSHClient().connect()
_X2GO_SESSION_PARAMS = ('geometry', 'depth', 'link', 'pack',
'cache_type', 'kblayout', 'kbtype',
- 'session_type', 'snd_system', 'cmd',
+ 'session_type', 'snd_system', 'snd_port',
+ 'cmd',
'rdp_server', 'rdp_options',
'xdmcp_server',
'rootdir', 'loglevel', 'profile_name', 'profile_id',
diff --git a/x2go/utils.py b/x2go/utils.py
index b45da47..4f3aef5 100644
--- a/x2go/utils.py
+++ b/x2go/utils.py
@@ -123,6 +123,7 @@ def _convert_SessionProfileOptions_2_SessionParams(_options):
'host': 'server',
'user': 'username',
'soundsystem': 'snd_system',
+ 'sndport': 'snd_port',
'type': 'kbtype',
'layout': 'kblayout',
'speed': 'link',
@@ -217,7 +218,6 @@ def _convert_SessionProfileOptions_2_SessionParams(_options):
'startsoundsystem',
'soundtunnel',
'defsndport',
- 'sndport',
'icon',
'applications',
]
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