[X2Go-Commits] [live-build-x2go] 49/95: add magic-pixel-workaround as modular file

git-admin at x2go.org git-admin at x2go.org
Wed Mar 20 22:45:54 CET 2019


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

x2go pushed a commit to branch feature/openbox-magic-pixel-workaround
in repository live-build-x2go.

commit 0435f259ea2b1b6f3c4edf170f3f35b38559d3a3
Author: Stefan Baur (BAUR-ITCS) <kontakt at baur-itcs.de>
Date:   Wed Jan 2 22:49:38 2019 +0100

    add magic-pixel-workaround as modular file
---
 .../X11/Xsession.d/60x11-magic-pixel-workaround    | 25 ++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/config/includes.chroot/etc/X11/Xsession.d/60x11-magic-pixel-workaround b/config/includes.chroot/etc/X11/Xsession.d/60x11-magic-pixel-workaround
new file mode 100644
index 0000000..8b9bd54
--- /dev/null
+++ b/config/includes.chroot/etc/X11/Xsession.d/60x11-magic-pixel-workaround
@@ -0,0 +1,25 @@
+# workaround for NX "magic pixel" being active in --thinclient mode
+if grep 'nomagicpixel=2' /proc/cmdline ; then
+	while ! ps -C xdotool >/dev/null ; do
+		while [ $(xdotool search --name . | wc -l) -lt 3 ] ; do
+			sleep 1
+		done ;
+		echo -en "\n$(date +'%F | %T | ')'$0' spawning window foreground monitor (magic-pixel-fix 2)." | tee -a /dev/tty8
+		xdotool search --class X2GoAgent behave %@ blur windowmap
+	done &
+elif grep 'nomagicpixel=1' /proc/cmdline ; then
+	echo -en "\n$(date +'%F | %T | ')'$0' spawning openbox monitor (magic-pixel-fix 1)." | tee -a /dev/tty8
+	while true ; do
+		while [ $(xdotool search --name . | wc -l) -ne 3 ] && ! ps -C openbox >/dev/null ; do
+			openbox &
+			echo -en "\n$(date +'%F | %T | ')'$0' spawned OpenBox." | tee -a /dev/tty8
+		done
+		while [ $(xdotool search --name . | wc -l) -eq 3 ] && ps -C openbox >/dev/null ; do
+			killall openbox
+			echo -en "\n$(date +'%F | %T | ')'$0' killed OpenBox." | tee -a /dev/tty8
+		done
+		sleep 1 # to save cpu cycles
+	done &
+else
+	: # NOP
+fi

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


More information about the x2go-commits mailing list