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 c54d1cafc1e474246da123269dbb736951241a4b Merge: 92b65b0 afefc03 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Wed Jan 2 22:27:36 2019 +0100 Merge commit 'afefc032b9a83456d3a999f0938d15f9563d815a' into feature/openbox-magic-pixel-workaround Conflicts: config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig .../etc/X11/Xsession.d/60x11-blanking-dpms-config | 31 +++++++++ .../etc/X11/Xsession.d/60x11-openbox-start | 4 ++ .../etc/X11/Xsession.d/60x11-set-background | 43 +++++++++++++ .../Xsession.d/60x11-spawn-configure-pulseaudio | 32 +++++++++ .../lib/live/config/2900-x2go-thinclientconfig | 75 ---------------------- 5 files changed, 110 insertions(+), 75 deletions(-) diff --cc config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig index fd5d919,9685d8a..9fa8c01 --- a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig @@@ -223,89 -194,7 +204,33 @@@ if [ -n "\$THROTTLEVALUES" ]; the fi fi -eval \$THROTTLINGCOMMAND x2goclient --thinclient --no-session-edit --no-menu --maximize --add-to-known-hosts --haltbt --read-exports-from=/home/user/export \$LDAPPARAMS \$SESSIONFROM \$BACKGROUND \$BRANDING \$STARTSESSION +# 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 + - # code to fix blank screen happening with DisplayPort and some buggy TFTs (xset q reports "Monitor is on" even though it is pitch black) - if grep -q '\W*blankdpmsfix\W*' /proc/cmdline; then - xset dpms force on dpms 0 0 0 -dpms - fi - - BLANKINGTIME=\$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | awk -F '=' '\$1 == "blank" { print \$2 }' | tr -dc '0-9:') - if [ -n "\$BLANKINGTIME" ]; then - DPMSARR=(\$(echo \$BLANKINGTIME | awk -F ':' '\$1 ~/^[0-9]*\$/ && \$2 ~/^[0-9]*\$/ && \$3 ~/^[0-9]*\$/ { print \$1 " " \$2 " " \$3}')) - if [ \${DPMSARR[0]} -eq 0 ]; then - # Disable screensaver and DPMS Power Saving if requested - xset s off - if grep -q '\W*nodpms\W*' /proc/cmdline; then - xset -dpms - fi - else - xset s on - xset s \${DPMSARR[0]} - if ! grep -q '\W*nodpms\W*' /proc/cmdline; then - # Yes, "+dpms dpms" is intentional. - xset +dpms dpms \${DPMSARR[0]} \${DPMSARR[1]} \${DPMSARR[2]} - fi - fi - fi - - if [ -n "\$AUDIOOUT" ] ; then - ( - while ! pacmd dump 2>&1| grep -q set-card-profile ; do - echo -en "\n\$(date +'%F | %T | ')'\$0': Waiting for pulseaudio to start ..." | tee -a /dev/tty8 - sleep 1 - done - if [ "\$AUDIOOUT" = "list" ] ; then - echo -en "\n\$(date +'%F | %T | ')'\$0': Available audio outputs:" | tee -a /dev/tty8 - AUDIOOUTPUTS=\$( for CARD in \$(pacmd list-cards | grep -A1 index | awk -F '[<> \t]' ' \$2 == "name:" { print \$4 }'); do - pacmd list-cards | \ - more +/"\$CARD" | \ - grep -m 1 "\$CARD" -A100000 | \ - more +/"profiles:" | \ - grep -m 1 -B10000 "active profile:" | \ - grep -A10000 "profiles" | \ - grep "\W\Woutput:" | \ - grep -v "active profile:" | \ - awk -F'[+:]' '{gsub("\t","",\$1) ; print "\"'\$CARD'|" \$1 ":" \$2 "\""} '; - done | \ - sort -u ) - for AUDIOOUTPUT in \$AUDIOOUTPUTS; do - echo -en "\n\$(date +'%F | %T | ')'\$0': \$AUDIOOUTPUT" | tee -a /dev/tty8 - done - echo -en "\n\$(date +'%F | %T | ')'\$0': \$(pacmd list | 'grep active profile')" | tee -a /dev/tty8 - elif (echo "\$AUDIOOUT" | grep -q '^[^|]*|[^|]*\$') ; then - \$(echo "\$AUDIOOUT" | sed -e 's/^/pacmd set-card-profile /' -e 's/|/ /') - else - : # NOP - fi - ) & - fi - +eval \$THROTTLINGCOMMAND x2goclient --thinclient --no-session-edit --no-menu --maximize --add-to-known-hosts --haltbt --read-exports-from=/home/user/export \$LDAPPARAMS \$SESSIONFROM \$BACKGROUND \$BRANDING \$STARTSESSION $DEBUGPARAMS # yes, no escape sign in front of DEBUGPARAMS, that is intentional XSESSION chown user:user /home/user/.xsession -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git