[X2Go-Commits] [x2goserver] 01/04: x2goserver-xsession: Port OPTIONS variable and has_option() function from recent version of /etc/X11/Xsession to X2Go's Xsession file. (Fixes: #1583). More porting is actually needed.
git-admin at x2go.org
git-admin at x2go.org
Mon May 16 21:45:18 CEST 2022
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository x2goserver.
commit 1f9a68b4d1d13f80073d888586b48999316d5907
Author: Hanno Foest <hurga-x2go at tigress.com>
Date: Mon May 16 21:29:38 2022 +0200
x2goserver-xsession: Port OPTIONS variable and has_option() function from recent version of /etc/X11/Xsession to X2Go's Xsession file. (Fixes: #1583). More porting is actually needed.
---
debian/changelog | 6 ++++++
x2goserver-xsession/etc/Xsession | 18 ++++++++++++++++++
2 files changed, 24 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 4d737e11..c0514892 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,12 @@ x2goserver (4.1.0.4-0x2go1.2) UNRELEASED; urgency=medium
- x2gocleansessions: Separate non-forking behavior from --debug into
--nofork.
+ [ Hanno Foest ]
+ * New upstream version (4.1.0.4):
+ - x2goserver-xsession: Port OPTIONS variable and has_option() function
+ from recent version of /etc/X11/Xsession to X2Go's Xsession file. (Fixes:
+ #1583). More porting is actually needed.
+
[ Mike Gabriel ]
* New upstream version (4.1.0.4):
- Fix version number in VERSION.x2goserver-desktopsharing.
diff --git a/x2goserver-xsession/etc/Xsession b/x2goserver-xsession/etc/Xsession
index 270a0b30..5df6101c 100755
--- a/x2goserver-xsession/etc/Xsession
+++ b/x2goserver-xsession/etc/Xsession
@@ -77,6 +77,24 @@ USERXSESSIONRC=$HOME/.xsessionrc-x2go
ALTUSERXSESSION=$HOME/.Xsession-x2go
ERRFILE="${HOME}/.xsession-x2go-${cur_hostname}-errors"
+OPTIONS="$(
+ if [ -r "$OPTIONFILE" ]; then
+ cat "$OPTIONFILE"
+ fi
+ if [ -d /etc/x2go/Xsession.options.d ]; then
+ run-parts --list --regex '\.conf$' /etc/x2go/Xsession.options.d | xargs -d '\n' cat
+ fi
+)"
+
+has_option() {
+ # Ensure that a later no-foo overrides an earlier foo
+ if [ "$(echo "$OPTIONS" | grep -Eo "^(no-)?$1\>" | tail -n 1)" = "$1" ]; then
+ return 0
+ else
+ return 1
+ fi
+}
+
# Move the old error log file away.
if [ -f "${ERRFILE}" ]; then
if [ -L "${ERRFILE}" ]; then
--
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