diff options
author | Manuel Schneider | 2014-04-08 11:28:57 +0200 |
---|---|---|
committer | Manuel Schneider | 2014-04-08 11:28:57 +0200 |
commit | 1b2e0fd433ee25f00cff36176892f25ab6e53541 (patch) | |
tree | 5b636a363ab94272d8d722cf964d6620d7840a37 /remote/modules/beamergui | |
parent | [beamergui] cont'd. missing files (diff) | |
download | tm-scripts-1b2e0fd433ee25f00cff36176892f25ab6e53541.tar.gz tm-scripts-1b2e0fd433ee25f00cff36176892f25ab6e53541.tar.xz tm-scripts-1b2e0fd433ee25f00cff36176892f25ab6e53541.zip |
[beamerui] xrandr output changed in 13.10. Now the hardware has to be polled, ommiting the param --current sould fix the problem. At least xrandr shows a proper output.
Diffstat (limited to 'remote/modules/beamergui')
3 files changed, 23 insertions, 14 deletions
diff --git a/remote/modules/beamergui/data/etc/X11/Xsession.d/99-beamergui-starter_script b/remote/modules/beamergui/data/etc/X11/Xsession.d/99-beamergui-starter_script index 097e10da..20910aa2 100755 --- a/remote/modules/beamergui/data/etc/X11/Xsession.d/99-beamergui-starter_script +++ b/remote/modules/beamergui/data/etc/X11/Xsession.d/99-beamergui-starter_script @@ -1,7 +1,5 @@ #!/bin/ash -# Explicitely call bash for the modesetter -/bin/bash /opt/openslx/scripts/beamergui-mode_setter - +# TODO USE CONF IN MODESETTERSCRIPT CONFIGFILE="/opt/openslx/beamergui/beamer.conf" /opt/openslx/bin/beamergui "$CONFIGFILE" & diff --git a/remote/modules/beamergui/data/etc/X11/Xsetup.d/99-modesetter-wrapper b/remote/modules/beamergui/data/etc/X11/Xsetup.d/99-modesetter-wrapper new file mode 100755 index 00000000..2bf56e7c --- /dev/null +++ b/remote/modules/beamergui/data/etc/X11/Xsetup.d/99-modesetter-wrapper @@ -0,0 +1,5 @@ +#!/bin/ash + +# Explicitely call bash for the modesetter +/bin/bash /opt/openslx/scripts/beamergui-mode_setter \ + 2>&1 > /tmp/modesetter.log diff --git a/remote/modules/beamergui/data/opt/openslx/scripts/beamergui-mode_setter b/remote/modules/beamergui/data/opt/openslx/scripts/beamergui-mode_setter index 6c0c6466..96f3d5b0 100755 --- a/remote/modules/beamergui/data/opt/openslx/scripts/beamergui-mode_setter +++ b/remote/modules/beamergui/data/opt/openslx/scripts/beamergui-mode_setter @@ -1,5 +1,5 @@ #! /bin/bash -# This script explicitely needs bash for the arrays +# This script needs bash for the arrays # This script adds the common resolutions to the Xserver if and only if there # is a beamer connected. Additionally, if the preferred resolution is known, @@ -23,12 +23,18 @@ MODES=("${MODES[@]}" "1280x960 101.25 1280 1360 1488 1696 960 963 967 996 - MODES=("${MODES[@]}" "1280x1024 109.00 1280 1368 1496 1712 1024 1027 1034 1063 -hsync +vsync") ################################################################################ -# Get initial information about the screend from xrandr -XRANDR=$( xrandr --current ) -XRANDRV=$( xrandr --current --verbose ) +CONFIGFILE="/opt/openslx/beamergui/beamer.conf" -echo "$XRANDR" >> /tmp/beamerlog -echo "$XRANDRV" >> /tmp/beamerlog +################################################################################ + +#DRIVER=$(lspci -nnk | grep -i vga -A3 | grep 'in use'| awk '{ print $NF }') +XRANDR=$( xrandr ) +XRANDRV=$( xrandr --verbose ) + +################################################################################ + +echo "$XRANDR" +echo "$XRANDRV" # Get the names of the connected outputs # This is a rigid approach to determine the connected outputs @@ -36,7 +42,7 @@ declare -a OUTPUTNAMES while read line; do OUTPUTNAMES+=("$(echo "$line" | grep -o "^\S*" )") done < <( echo "$XRANDR" | egrep ".*[[:digit:]]{1,}mm x [[:digit:]]{1,}mm" ) -echo -e "Connected outputs: \e[32m${OUTPUTNAMES[@]}\e[0m" >> /tmp/beamerlog +echo -e "Connected outputs: \e[32m${OUTPUTNAMES[@]}\e[0m" # The goal is to add more modelines to the X server. While this is done the # screen is flickering. Hence this is just necessary if there is a beamer. Do @@ -68,7 +74,7 @@ if [ ${#OUTPUTNAMES[@]} -eq 2 ]; then else BEAMER=1; fi - echo "${OUTPUTNAMES[$BEAMER]} is a beamer. " >> /tmp/beamerlog + echo "${OUTPUTNAMES[$BEAMER]} is a beamer. " # Finally, if the EDID is present, apply a proper resolution. # Find out whether the beamer transmits reliable EDID data. @@ -76,7 +82,7 @@ if [ ${#OUTPUTNAMES[@]} -eq 2 ]; then if echo "$XRANDRV" | grep -Pzo \ "^${OUTPUTNAMES[$BEAMER]}\N*\n((\ |\t)+\N*\n)+" \ | grep EDID > /dev/null ; then - echo "EDID present" >> /tmp/beamerlog + echo "EDID present" # If the breamer transmits the EDID there shall be a preferred resolution. OPTIMALRES=$(echo "$XRANDRV" \ @@ -92,8 +98,8 @@ if [ ${#OUTPUTNAMES[@]} -eq 2 ]; then --same-as ${OUTPUTNAMES[$((1-$BEAMER))]} fi else - echo "No beamers found." >> /tmp/beamerlog + echo "No beamers found." fi else - echo "More than 2 outs." >> /tmp/beamerlog + echo "More than 2 outs." fi |