This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch feature/fvwm in repository live-build-x2go. commit c4161a24e06df3821862880e35f61ef1d9631bd2 Author: Stefan Baur (BAUR-ITCS) <kontakt@baur-itcs.de> Date: Fri Dec 16 02:31:25 2016 +0100 added multiscreen/xinerama support --- .../lib/live/config/2800-x2go-thinclientconfig | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/config/includes.chroot/lib/live/config/2800-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2800-x2go-thinclientconfig index f909a7a..96557d2 100755 --- a/config/includes.chroot/lib/live/config/2800-x2go-thinclientconfig +++ b/config/includes.chroot/lib/live/config/2800-x2go-thinclientconfig @@ -95,6 +95,64 @@ ps -C pulseaudio --no-headers || (su - user -c "pulseaudio -D -n -L 'module-nati pulseaudio -D -n -L 'module-native-protocol-tcp port=4713' -L 'module-udev-detect' --exit-idle-time=65535 &
> f17b900... moved amixer calls to startup script and changed pulseaudio spawn - wouldn't work otherwise, hopefully does now
+# additional variable instead of "case $(...) in", as we need the value again later on +XRANDRCMDTAINTED=\$(cat /proc/cmdline | tr ' ' '\n' | awk -F '=' '\\\$1 == "xinerama" { print \\\$2 }') + +# sanitize input +case $XRANDRCMDTAINTED in +"above") + XRANDRCMD="above" + ;; +"below") + XRANDRCMD="below" + ;; +"same-as") + XRANDRCMD="same-as" + ;; +"right-of") + XRANDRCMD="right-of" + ;; +*) + XRANDRCMD="left-of" # default + ;; +esac + +# find out how many touch devices we have +TOUCHDEVICESCOUNT = \$(LANG=C xsetwacom --list devices | wc -l) + +# find out how many mouse devices we have +MICECOUNT = \$(find /dev/input -maxdepth 1 -name "mouse*" | wc -l) + +# loop through the following code block for all connected display devices +for NEXT_DISPLAY in \$(LANG=C xrandr 2>/dev/null | grep ' connected ' | cut -d ' ' -f1); do + + #remove trailing newline from NEXT_DISPLAY + NEXT_DISPLAY=\${NEXT_DISPLAY%\$'\n'} + + # THIS_DISPLAY won't be defined until the second time the loop is executed, which is a + # neat way of running xrandr only if there are at least two connected display devices + if [ -n \${THIS_DISPLAY+x} ] ; then + + if [ \$TOUCHDEVICESCOUNT -gt 0 ] && [ \$MICECOUNT -lt 1 ] && [ -z \$XRANDRCMDTAINTED ]; then + # we have a touch device and no mice, and no xinerama parameter was set, + # so switch to clone view to make the touch device usable + /usr/bin/xrandr --output \$NEXT_DISPLAY --same-as \$THIS_DISPLAY + + else + # else use whatever is in XRANDRCMD (which is either our default of "left-of", + # or a valid xinerama kernel parameter value) + /usr/bin/xrandr --output \$NEXT_DISPLAY --\$xrandrcmd \$THIS_DISPLAY + fi + + # now set THIS_DISPLAY -> every subsequent iteration of the loop will now enter the code block + # above where [ -n \${THIS_DISPLAY+x} ] is the conditional + THIS_DISPLAY = \$NEXT_DISPLAY + fi +done + +# set screen background to X2Go default blue on all detected screens +xsetroot -solid "#246ed8" + # Spawn openbox openbox & -- Alioth's /srv/git/code.x2go.org/live-build-x2go.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git