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 e391e2958e50e123944f63785b1a8c3d0df04fef Author: Stefan Baur <kontakt@baur-itcs.de> Date: Thu Dec 7 00:34:46 2017 +0100 added code so xsession can log to tty8, added 1 second wait in loop to lower cpu usage --- .../lib/live/config/2900-x2go-thinclientconfig | 39 ++++++++++++---------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig index 5bbe0a9..0279dad 100755 --- a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig @@ -19,6 +19,9 @@ sed -i -e '\#<applications>#a<application title="X2Go Client" type="normal">' -e #make sure OpenBox' ToggleMaximize is disabled, or else clicking the top row of pixels will un-maximize X2GoClient sed -i -e '/ToggleMaximize/d' /etc/xdg/openbox/rc.xml +# this is so that xsession can log to tty8 +adduser user tty + cat >/home/user/.xsession <<XSESSION # inspired by # http://code.x2go.org/gitweb?p=x2gothinclient.git;a=blob_plain;f=displaymanag... @@ -84,7 +87,7 @@ done # Spawn openbox openbox & -echo -n "\n\$(date +'%F | %T | ')'\$0' spawned OpenBox." +echo -en "\n\$(date +'%F | %T | ')'\$0' spawned OpenBox." | tee -a /dev/tty8 # set screen background to X2Go default blue on all detected screens xsetroot -solid "#246ed8" @@ -228,25 +231,25 @@ fi # 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 -n "\n\$(date +'%F | %T | ')'\$0' spawning window foreground monitor (magic-pixel-fix 2)." - xdotool search . behave %@ blur windowmap + 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 . behave %@ blur windowmap done & elif grep 'nomagicpixel=1' /proc/cmdline ; then - echo -n "\n\$(date +'%F | %T | ')'\$0' spawning openbox monitor (magic-pixel-fix 1)." - while true ; do - while [ \$(xdotool search --name . | wc -l) -ne 3 ] && ! ps -C openbox >/dev/null ; do - openbox & - echo -n "\n\$(date +'%F | %T | ')'\$0' spawned OpenBox." - done - while [ \$(xdotool search --name . | wc -l) -eq 3 ] && ps -C openbox >/dev/null ; do - killall openbox - echo -n "\n\$(date +'%F | %T | ')'\$0' killed OpenBox." - done - echo -n "\n\$(date +'%F | %T | ')'\$0' reloading openbox monitor (magic-pixel-fix 1)." - done & + 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