[X2Go-Commits] [python-x2go] 01/01: Natively support xinerama option.

git-admin at x2go.org git-admin at x2go.org
Mon May 14 16:30:11 CEST 2018


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository python-x2go.

commit 7ed68ae6ff848c334bd65391a980961cb1e553d1
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Mon May 14 16:30:02 2018 +0200

    Natively support xinerama option.
---
 debian/changelog                |  1 +
 x2go/backends/terminal/plain.py | 26 +++++++++++++-------------
 x2go/session.py                 |  2 +-
 x2go/utils.py                   |  1 -
 4 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 2afde96..35b6903 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,7 @@ python-x2go (0.5.99.1-0x2go1) UNRELEASED; urgency=medium
     - Drop unit test framework. Never really used (though we should have).
       (Fixes: #1259).
     - x2go/checkhosts.py: Python3 fix in get_key_fingerprint().
+    - Natively support xinerama option.
   * debian/: Adapt to building API docs with Sphinx.
 
  -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Fri, 22 Sep 2017 14:15:05 +0200
diff --git a/x2go/backends/terminal/plain.py b/x2go/backends/terminal/plain.py
index 5029545..b710cc5 100644
--- a/x2go/backends/terminal/plain.py
+++ b/x2go/backends/terminal/plain.py
@@ -214,6 +214,7 @@ class X2GoTerminalSession(object):
                  cache_type="unix-kde",
                  kbtype='null/null', kblayout='null', kbvariant='null',
                  clipboard='both',
+                 xinerama=False,
                  session_type="application", snd_system='pulse', snd_port=4713, cmd=None,
                  published_applications=False,
                  set_session_title=False, session_title="", applications=[],
@@ -259,6 +260,8 @@ class X2GoTerminalSession(object):
         @type kbvariant: ``str``
         @param clipboard: clipboard mode (``both``: bidirectional copy+paste, ``server``: copy+paste from server to
             client, ``client``: copy+paste from client to server, ``none``: disable clipboard completely
+        @param xinerama: enable/disable Xinerama support in remote X2Go session
+        @type xinerama: ``bool``
         @type clipboard: ``str``
         @param session_type: either ``desktop``, ``application`` (rootless session) or ``shared``
         @type session_type: ``str``
@@ -364,6 +367,7 @@ class X2GoTerminalSession(object):
         self.params.cmd = str(cmd)
         self.params.depth = str(depth)
         self.params.clipboard = str(clipboard)
+        self.params.xinerama = bool(xinerama)
 
         self.params.published_applications = published_applications
         self.published_applications = published_applications
@@ -1554,13 +1558,10 @@ class X2GoTerminalSession(object):
         if self.params.dpi:
             cmd_line = ['X2GODPI=%s' % self.params.dpi] + cmd_line
 
-        xinerama = False
-        xinerama_check = getattr(self.params, 'xinerama', None)
-        if xinerama_check is not None:
-            if instanceof(xinerama_check, int):
-                xinerama = xinerama_check
-
-        cmd_line = ['X2GO_XINERAMA=%s' % str(xinerama)] + cmd_line
+        if self.params.xinerama:
+            cmd_line = ['X2GO_XINERAMA=true'] + cmd_line
+        else:
+            cmd_line = ['X2GO_XINERAMA=false'] + cmd_line
 
         (stdin, stdout, stderr) = self.control_session._x2go_exec_command(cmd_line)
 
@@ -1629,12 +1630,6 @@ class X2GoTerminalSession(object):
         if self.params.kbtype != "null/null":
             setkbd = "1"
 
-        xinerama = False
-        xinerama_check = getattr(self.params, 'xinerama', None)
-        if xinerama_check is not None:
-            if instanceof(xinerama_check, int):
-                xinerama = xinerama_check
-
         if self.params.geometry == 'maximize':
             _geometry = utils.get_workarea_geometry()
             if _geometry is None or len(_geometry) != 2:
@@ -1645,6 +1640,11 @@ class X2GoTerminalSession(object):
                 self.logger('failed to detect best maxmimized geometry of your client-side desktop, using 1024x768 instead', loglevel=log.loglevel_WARN)
                 self.params.geometry = "1024x768"
 
+        if self.params.xinerama:
+            cmd_line = ['X2GO_XINERAMA=true'] + cmd_line
+        else:
+            cmd_line = ['X2GO_XINERAMA=false'] + cmd_line
+
         cmd_line = [ "x2goresume-session", self.session_info.name,
                      self.params.geometry,
                      self.params.link,
diff --git a/x2go/session.py b/x2go/session.py
index edb8725..bfc206f 100644
--- a/x2go/session.py
+++ b/x2go/session.py
@@ -100,7 +100,7 @@ _X2GO_SESSION_PARAMS = ('use_sshproxy', 'sshproxy_reuse_authinfo',
 """A list of allowed X2Go pure session parameters (i.e. parameters that are passed on neither to an X2GoControlSession, X2GoSSHProxy nor an X2GoControlSession object."""
 # options of the paramiko.SSHClient().connect() method, any option that is allowed for a terminal session instance
 _X2GO_TERMINAL_PARAMS = ('geometry', 'depth', 'link', 'pack', 'dpi',
-                         'cache_type', 'kbtype', 'kblayout', 'kbvariant', 'clipboard',
+                         'cache_type', 'kbtype', 'kblayout', 'kbvariant', 'clipboard', 'xinerama',
                          'session_type', 'snd_system', 'snd_port',
                          'cmd', 'set_session_title', 'session_title',
                          'rdp_server', 'rdp_options', 'applications',
diff --git a/x2go/utils.py b/x2go/utils.py
index b21f722..2edecd9 100644
--- a/x2go/utils.py
+++ b/x2go/utils.py
@@ -365,7 +365,6 @@ def _convert_SessionProfileOptions_2_SessionParams(options):
             'soundtunnel',
             'defsndport',
             'icon',
-            'xinerama',
             'multidisp',
             'display',
             'krblogin',

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/python-x2go.git


More information about the x2go-commits mailing list