[X2Go-Commits] [x2goserver] 01/02: x2goserver/bin/x2gostartagent: pass in xinerama configuration value via environment.
git-admin at x2go.org
git-admin at x2go.org
Wed Jan 10 07:04:39 CET 2018
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository x2goserver.
commit fc416d6f254cb94de7942b47f0a920158ef79db6
Author: Mihai Moldovan <ionic at ionic.de>
Date: Wed Jan 10 07:01:00 2018 +0100
x2goserver/bin/x2gostartagent: pass in xinerama configuration value via environment.
Doing it via an argument is just asking for trouble since we actually
have optional parameters.
---
debian/changelog | 3 +++
x2goserver/bin/x2gostartagent | 18 ++++++------------
2 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 36d871d..28bfd44 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -210,6 +210,9 @@ x2goserver (4.1.0.0-0x2go1.2) UNRELEASED; urgency=low
(with value interpreted by x2goistrue). Note that it is not possible to
change the RRXinerama preference after a session has been started
currently.
+ - x2goserver/bin/x2gostartagent: pass in xinerama configuration value via
+ environment. Doing it via an argument is just asking for trouble since
+ we actually have optional parameters.
* x2goserver.spec:
- Only create session DB in x2goserver's post install script. Do use
proper Requires(post) statements to make sure perl-X2Go-Server-DB and
diff --git a/x2goserver/bin/x2gostartagent b/x2goserver/bin/x2gostartagent
index c285f06..d9a2a45 100755
--- a/x2goserver/bin/x2gostartagent
+++ b/x2goserver/bin/x2gostartagent
@@ -115,18 +115,12 @@ fi
typeset -i x2go_randr_xinerama='1'
-# Extending optional parameters isn't trivially possible, but
-# we want this script to work with newer X2Go Client versions
-# that supply a Xinerama configuration value and with older
-# ones that do not.
-# Since we already have trailing optional arguments (for
-# the desktop sharing functionality), go ahead and scan
-# all arguments for the required value.
-typeset item=''
-for item in "${@}"; do
- typeset tmp_regex='^randr_xinerama=(.*)$'
- [[ "${item}" =~ ${tmp_regex} ]] && x2go_randr_xinerama="$("${X2GO_LIB_PATH}/x2goistrue" "${BASH_REMATCH[1]}")"
-done
+# Extending optional parameters isn't trivially possible.
+# Since we want this script to work with newer X2Go Client
+# versions that supply a Xinerama configuration value and
+# also with older ones that do not, we pass it in as an
+# environment variable.
+[[ -n "${X2GO_RANDR_XINERAMA}" ]] && x2go_randr_xinerama="$("${X2GO_LIB_PATH}/x2goistrue" "${X2GO_RANDR_XINERAMA}")"
X2GO_GEOMETRY="${1}"; shift
X2GO_LINK="${1}"; shift
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goserver.git
More information about the x2go-commits
mailing list