diff options
28 files changed, 112 insertions, 541 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 new file mode 100755 index 00000000..0d3e4ed6 --- /dev/null +++ b/remote/modules/beamergui/data/etc/X11/Xsession.d/99-beamergui-starter_script @@ -0,0 +1,5 @@ +#!/bin/ash + +CONFIGFILE="/opt/openslx/beamergui/beamer.conf" + +/opt/openslx/bin/beamergui "$CONFIGFILE" & diff --git a/remote/modules/beamergui/data/etc/X11/Xsetup.d/99-beamergui-mode_setter_wrapper b/remote/modules/beamergui/data/etc/X11/Xsetup.d/99-beamergui-mode_setter_wrapper new file mode 100755 index 00000000..583f7e58 --- /dev/null +++ b/remote/modules/beamergui/data/etc/X11/Xsetup.d/99-beamergui-mode_setter_wrapper @@ -0,0 +1,5 @@ +#! /bin/ash + +# This script explicitely calls bash for the xrandr wrappe script + +/bin/bash /opt/openslx/scripts/beamergui-mode_setter diff --git a/remote/modules/beamergui/data/opt/openslx/bin/screenRecognizer.sh b/remote/modules/beamergui/data/opt/openslx/bin/screenRecognizer.sh deleted file mode 100755 index feabe7ee..00000000 --- a/remote/modules/beamergui/data/opt/openslx/bin/screenRecognizer.sh +++ /dev/null @@ -1,418 +0,0 @@ -#! /bin/bash - -RES1610=(1920x1200 1680x1050 1440x900 1280x800 ) -RES169=(1920x1080 1600x900 1280x720 ) -RES54=(1280x1024 ) -RES43=(1280x960 1152x864 1024x768 ) -ALLRES=( ${RES1610[@]} ${RES169[@]} ${RES54[@]} ${RES43[@]} ) - -echo -e "\e[32mSupported resolutions\e[0m" -for i in ${ALLRES[@]} -do - echo -n "$i - " - echo "scale=2; $i" | tr "x" "/" | bc -l -done - -# Get initial data -XRANDR=$( xrandr ) -XRANDRV=$( xrandr --verbose ) - -# Get the connected outputs -declare -a OUTPUTNAMES -while read line; do - OUTPUTNAMES+=("$(echo "$line" | grep -o "^\S*" )") -done < <( echo "$XRANDR" | grep -i " connected" ) -echo -e "Connected outputs: \e[32m${OUTPUTNAMES[@]}\e[0m" - - -if [ ${#OUTPUTNAMES[@]} -eq 1 ]; then - - - # In case of one connected output - xrandr --auto - exit - - -elif [ ${#OUTPUTNAMES[@]} -eq 2 ]; then - - - # In case of two connected outputs - # If one of the two connected outputs is a beamer, based on the assumption - # that a beamer can not output a reasonable dimension. - if ! ( echo "$XRANDR" | egrep "^${OUTPUTNAMES[0]}.*[[:digit:]]{2,}mm x [[:digit:]]{2,}mm" > /dev/null \ - && echo "$XRANDR" | egrep "^${OUTPUTNAMES[1]}.*[[:digit:]]{2,}mm x [[:digit:]]{2,}mm" > /dev/null ); then - - - # If one scree is a beamer. First check which one is the BEAMER - if [[ -z "$(echo "$XRANDR" | egrep "^${OUTPUTNAMES[0]}.*[[:digit:]]{2,}mm x [[:digit:]]{2,}mm")" ]] - then BEAMER=0; else BEAMER=1; fi - echo -ne "${OUTPUTNAMES[$BEAMER]} is a beamer. " - - - # Get the supported modes of the outputs - # Get resolutions of output #0 - for RES in $( echo "$XRANDR" | grep -Pzo \ - "(?s)^${OUTPUTNAMES[0]} connected\N*\n(\t+\N*\n)*(\ +\N*\n)*" \ - | egrep -o "\ \ [[:digit:]]+x[[:digit:]]+" ); do - OUTPUT0+=("$RES"); - done - echo -e "\e[31mOUTPUT0:\e[0m" - for i in ${OUTPUT0[@]}; do echo "$i";done - - # Get resolutions of output #1 - for RES in $( echo "$XRANDR" | grep -Pzo \ - "(?s)^${OUTPUTNAMES[1]} connected\N*\n(\t+\N*\n)*(\ +\N*\n)*" \ - | egrep -o "\ \ [[:digit:]]+x[[:digit:]]+" ); do - OUTPUT1+=("$RES"); - done - echo -e "\e[31mOUTPUT1:\e[0m" - for i in ${OUTPUT1[@]}; do echo "$i";done - - - # Find out, if the beamer transmits reliable EDID data. The data in xrandr - # should be reliable if the EDID is present. - if echo "$XRANDRV" | grep -Pzo \ - "^${OUTPUTNAMES[$BEAMER]}\N*\n((\ |\t)+\N*\n)+" \ - | grep EDID > /dev/null ; then - - - echo "EDID present" - - # If the beamer transmits reliable EDID data, get the perfect match - # Presumed the preferred resolution is the native one, get both native - # resolutions - BEAMERPREF=$(echo "$XRANDRV" \ - | grep -Pzo "^${OUTPUTNAMES[$BEAMER]}\N*\n((\ |\t)+\N*\n)+" \ - | grep preferred | awk '{print $1}') - echo -e "\e[32mBEAMERPREF\e[0m=$BEAMERPREF" - MONITORPREF=$(echo "$XRANDRV" \ - | grep -Pzo "^${OUTPUTNAMES[$((1-$BEAMER))]}\N*\n((\ |\t)+\N*\n)+" \ - | grep preferred | awk '{print $1}') - echo -e "\e[32mMONITORPREF\e[0m=$MONITORPREF" - - # Compute the optimal resolution for presentations - # which is min( 1280, M.X, B.X ) - OPTIMALRESX=$(( ${MONITORPREF%x*} <= ${BEAMERPREF%x*} ? \ - ${MONITORPREF%x*} : ${BEAMERPREF%x*} )) - OPTIMALRESX=$(( $OPTIMALRESX <= 1280 ? $OPTIMALRESX : 1280 )) - AR=$(echo "$BEAMERPREF" | tr "x" "/" | bc -l) # "scale=2; 5/4" - OPTIMALRESY=$(echo "scale=0; $OPTIMALRESX / $(echo "$AR" | bc -l)" | bc -l) - OPTIMALRES="$OPTIMALRESX"x"$OPTIMALRESY" - echo -e "\e[32mOPTIMALRESX\e[0m=$OPTIMALRESX" - echo -e "\e[32mOPTIMALRESY\e[0m=$OPTIMALRESY" - echo -e "\e[32mOPTIMALRES\e[0m=$OPTIMALRES" - echo -e "\e[32mAR\e[0m=$AR" - - # Generate a list of common resolutions (Greedy fun) - for RES1 in ${OUTPUT0[@]}; do - for RES2 in ${OUTPUT1[@]}; do - if [ $RES1 = $RES2 ]; then - COMMONMATCHES+=("$RES1") - fi - done - done - echo -e "\e[31mCOMMONMATCHES:\e[0m" - for i in "${COMMONMATCHES[@]}" - do echo "$i - $( echo "scale=2; $i" | tr "x" "/" | bc -l)" - done - - # Compute the additional resolutions - for i in ${ALLRES[@]}; do - if (( $( echo "$i == $AR" | tr "x" "/" | bc -l ) )); then - if echo ${COMMONMATCHES[@]} | grep "$i" > /dev/null; then - if [ "$OPTIMALRES" = "$i" ]; then continue; fi - ADDITIONALRES+=("$i") - else - xrandr \ - --addmode ${OUTPUTNAMES[$((1-$BEAMER))]} "$i" \ - --addmode ${OUTPUTNAMES[$BEAMER]} "$i" \ - && ADDITIONALRES+=("$i") - fi - fi - done - echo -e "\e[31mADDITIONALRES:\e[0m" - for i in "${ADDITIONALRES[@]}" - do echo "$i - $( echo "scale=2; ${i% *}" | tr "x" "/" | bc -l)" - done - - # Apply the optimal resolution - xrandr \ - --addmode ${OUTPUTNAMES[$((1-$BEAMER))]} $OPTIMALRES \ - --addmode ${OUTPUTNAMES[$BEAMER]} $OPTIMALRES; - xrandr \ - --output ${OUTPUTNAMES[$((1-$BEAMER))]} --mode $OPTIMALRES \ - --primary \ - --output ${OUTPUTNAMES[$BEAMER]} --mode $OPTIMALRES \ - --same-as ${OUTPUTNAMES[$((1-$BEAMER))]} - - # Ask for a resolution - CHOSENRES=$( zenity --list \ - --title="Resolution Chooser" \ - --ok-label="Apply" \ - --cancel-label="Cancel" \ - --text "Choose a resolution\nor press cancel." \ - --width=300 --height=400 \ - --column="Resolution" "$OPTIMALRES (optimal)" "${ADDITIONALRES[@]}" \ - --print-column=1 \ - --hide-header ) || exit - echo "Chosen resolution $CHOSENRES" - - - - # Apply resolution - xrandr \ - --output ${OUTPUTNAMES[0]} --mode ${CHOSENRES%% *} \ - --output ${OUTPUTNAMES[1]} --mode ${CHOSENRES%% *} \ - --same-as ${OUTPUTNAMES[0]} - - - # If beamer DOES NOT transmit reliable EDID data - else - - echo "EDID is not present" - - # Compute the additional resolutions - for i in ${ALLRES[@]}; do - if ! xrandr \ - --addmode ${OUTPUTNAMES[$((1-$BEAMER))]} "$i" \ - --addmode ${OUTPUTNAMES[$BEAMER]} "$i"; then - if xrandr --newmode \ - "$i" $( cvt $(echo "$i" | tr "x" " " ) \ - | grep Modeline | cut -d " " -f3-); then - if ! xrandr --dryrun \ - --addmode ${OUTPUTNAMES[$((1-$BEAMER))]} "$i" \ - --addmode ${OUTPUTNAMES[$BEAMER]} "$i"; then - continue; - fi - else - continue - fi - fi - AR=$(echo "scale=2; $i" | tr "x" "/" | bc -l ) - case $AR in - "1.60") - ADDITIONALRES+=("$i (16:10)") - ;; - "1.77") - ADDITIONALRES+=("$i (16:9)") - ;; - "1.25") - ADDITIONALRES+=("$i (5:4)") - ;; - "1.33") - ADDITIONALRES+=("$i (4:3)") - ;; - *) - esac - done - echo -e "\e[31mADDITIONALRES:\e[0m" - for i in "${ADDITIONALRES[@]}" - do echo "$i - $( echo "scale=2; ${i% *}" | tr "x" "/" | bc -l)" - done - - TEXT="The connected beamer did not transmit reliable configuration\n" \ - TEXT+="data. To avoid clipping or streching, it is recommended to\n" \ - TEXT+="choose a resolution equal to the aspect ratio of the native\n" \ - TEXT+="resolution of the beamer." \ - - # Ask for a resolution - CHOSENRES=$( zenity --list \ - --title="Resolution Chooser" \ - --ok-label="Apply" \ - --cancel-label="Cancel" \ - --text "$TEXT" \ - --width=300 --height=400 \ - --column="Resolution" "${ADDITIONALRES[@]}" \ - --print-column=1 \ - --hide-header ) || exit - echo "Chosen resolution ${CHOSENRES%% *}" - - # Apply resolution - xrandr \ - --addmode ${OUTPUTNAMES[0]} ${CHOSENRES%% *} \ - --addmode ${OUTPUTNAMES[1]} ${CHOSENRES%% *}; - xrandr \ - --output ${OUTPUTNAMES[$((1-$BEAMER))]} --mode ${CHOSENRES%% *} \ - --primary \ - --output ${OUTPUTNAMES[$BEAMER]} --mode ${CHOSENRES%% *} \ - --same-as ${OUTPUTNAMES[$((1-$BEAMER))]} - - fi - else - - - # If neiter of the outputs is a beamer (likely dualscreen - # setup) just apply preferred settings - echo "no beamer" - xrandr \ - --output ${OUTPUTNAMES[0]} --preferred \ - --output ${OUTPUTNAMES[1]} --preferred \ - --right-of ${OUTPUTNAMES[0]} - - - fi - -else - # If there are more than 3 outputs - # its up to the user. Quit. - exit; -fi - - - - # OLD APPROACH - # Find out, if the beamer transmits reliable EDID data. - # For the first assumption the beamer transmits reliable data, if in - # Xorg.log '*EDID for output $BEAMER*' is succeded by '*Manufacturer*' - # and '*Year*'. - # BEAMERELIABILITY=1 - # while read line - # do - # if echo $line | grep "EDID for output ${OUTPUTNAMES[$BEAMER]}" > /dev/null - # then - # read line - # if echo $line | grep "Manufacturer" > /dev/null - # then - # BEAMERELIABILITY=0 - # break - # fi - # fi - # done < "/var/log/Xorg.0.log" - - - - - - -# # if one of the outputs is a beamer, offer a choice -# declare -a OUTPUT1 -# declare -a OUTPUT2 -# - -# # Make sure the desired resolutions are existent -# # FULLHD -# #for in -# -# -# ####################################DEBUG################################### -# echo ${NATIVEMATCHES[@]} -# echo -e "\e[31m--------------------------------\e[0m" -# ############################################################################ -# -# # Add some experimental standard resolutions, which the outputs should be -# # able to display via interpolation. -# declare -a EXPERIMENTALMATCHES=("1920x1080 (16:9)" "1366x768 (16:9)" "1280x960 (4:3)" "1280x720 (16:9)") -# -# ## Form an interactive dialog to suit the users preferred resolution -# #zenity --question \ -# # --timeout=10 \ -# # --text="Do you want to change the resolution?" \ -# # --ok-label "Yes" \ -# # --cancel-label "No" -# -#OfferChoice() -#{ -# false; while [ "$?" != 0 ] #bash do{...}while(...) imitation -# do -# -# -# CHOSENRES=$( zenity --list \ -# --title="Resolution Chooser" \ -# --ok-label="Apply" \ -# --cancel-label="Cancel" \ -# --text "Choose a resolution\nor press cancel." \ -# --width=300 --height=400 \ -# --column="Resolution" 1920x1080 1366x768 1280x720 1024x768 \ -# --print-column=1 \ -# --hide-header ) -# -# ####################################DEBUG################################# -# echo "Chosen resolution $CHOSENRES" -# echo -e "\e[31m--------------------------------\e[0m" -# ########################################################################## -# -# if [ $? != 0 ] -# then -# break -# fi -# -# xrandr \ -# --output ${OUTPUTNAMES[0]} --mode ${CHOSENRES%% *} \ -# --output ${OUTPUTNAMES[1]} --mode ${CHOSENRES%% *} \ -# --same-as ${OUTPUTNAMES[0]} -# -# # in case the mode is unknown -# if [ $? != 0 ] -# then -# xrandr \ -# --addmode ${OUTPUTNAMES[0]} ${CHOSENRES%% *} \ -# --addmode ${OUTPUTNAMES[1]} ${CHOSENRES%% *} -# xrandr \ -# --output ${OUTPUTNAMES[0]} --mode ${CHOSENRES%% *} --primary \ -# --output ${OUTPUTNAMES[1]} --mode ${CHOSENRES%% *} --same-as ${OUTPUTNAMES[0]} -# -# #CVT="$(cvt $(echo ${CHOSENRES%% *} | cut -d " " -f1 | tr "x" " ") | grep Modeline)" -# #MODENAME=echo $CVT | cut -d " " -f2) -# #MODELINE=echo $CVT | cut -d " " -f3-) -# fi -# -# zenity --question \ -# --text="Do you want to stay with this resolution?" \ -# --ok-label "Yes" \ -# --cancel-label "No" -# -# # In case of timeout -# #if [ $? -eq 5]; then ;fi -# -# done -#} -# # If the beamer fits in the monitor, teach the monitor the preferred -# # mode of the beamer -# xrandr --addmode ${OUTPUTNAMES[$((1-$BEAMER))]} $BEAMERPREF -# xrandr --output ${OUTPUTNAMES[$((1-$BEAMER))]} \ -# --mode $BEAMERPREF \ -# --primary \ -# --output ${OUTPUTNAMES[$BEAMER]} \ -# --mode $BEAMERPREF \ -# --same-as ${OUTPUTNAMES[$((1-$BEAMER))]} -# echo -e "\e[32mPERFECTMATCH\e[0m=$BEAMERPREF" -# -# # If the monitor fits in the beamer, teach the beamer the preferred -# # mode of the monitor -# xrandr --addmode ${OUTPUTNAMES[$BEAMER]} $MONITORPREF -# xrandr --output ${OUTPUTNAMES[$((1-$BEAMER))]} \ -# --mode $MONITORPREF \ -# --primary \ -# --output ${OUTPUTNAMES[$BEAMER]} \ -# --mode $MONITORPREF \ -# --same-as ${OUTPUTNAMES[$((1-$BEAMER))]} -# -# -# -# -# -# Offer a mode selection -# 1920x1080, 1366x768, 1280x800 and 1024x800 have to be available. -# Check if the TFT supports the resolution -# if echo "$XRANDRV" \ -# | grep -Pzo "^${OUTPUTNAMES[$((1-$BEAMER))]}\N*\n((\ |\t)+\N*\n)+" \ -# | grep $MODE > /dev/null -# then -# -# # If so, just assign the beamers preferred resolution to the TFT -# xrandr \ -# --output ${OUTPUTNAMES[0]} --mode $MODE \ -# --output ${OUTPUTNAMES[1]} --mode $MODE \ -# --same-as ${OUTPUTNAMES[0]} -# else -# -# # If not, teach the TFT the mode -# xrandr \ -# --addmode ${OUTPUTNAMES[$((1-$BEAMER))]} $MODE -# --output ${OUTPUTNAMES[0]} --mode $MODE \ -# --output ${OUTPUTNAMES[1]} --mode $MODE \ -# --same-as ${OUTPUTNAMES[0]} -# fi -# -# #OfferChoice -# #echo "Offered choice" diff --git a/remote/modules/beamergui/data/opt/openslx/scripts/beamergui-Xsetup_script b/remote/modules/beamergui/data/opt/openslx/scripts/beamergui-mode_setter index f58933e2..f58933e2 100755 --- a/remote/modules/beamergui/data/opt/openslx/scripts/beamergui-Xsetup_script +++ b/remote/modules/beamergui/data/opt/openslx/scripts/beamergui-mode_setter diff --git a/remote/modules/beamergui/data/opt/openslx/vmchooser/sessionstart.d/99-kill_beamergui b/remote/modules/beamergui/data/opt/openslx/vmchooser/sessionstart.d/99-kill_beamergui new file mode 100644 index 00000000..012246ba --- /dev/null +++ b/remote/modules/beamergui/data/opt/openslx/vmchooser/sessionstart.d/99-kill_beamergui @@ -0,0 +1,3 @@ +#!/bin/ash +killall beamergui + diff --git a/remote/modules/cups/cups.conf.ubuntu b/remote/modules/cups/cups.conf.ubuntu index 6eeb9aeb..ff5a23d7 100644 --- a/remote/modules/cups/cups.conf.ubuntu +++ b/remote/modules/cups/cups.conf.ubuntu @@ -1,8 +1,10 @@ REQUIRED_INSTALLED_PACKAGES=" cups cups-daemon + ghostscript-cups " REQUIRED_CONTENT_PACKAGES=" cups cups-daemon + ghostscript-cups " diff --git a/remote/modules/kdm/data/etc/kde4/kdm/Xreset b/remote/modules/kdm/data/etc/kde4/kdm/Xreset deleted file mode 100755 index 64194a64..00000000 --- a/remote/modules/kdm/data/etc/kde4/kdm/Xreset +++ /dev/null @@ -1,17 +0,0 @@ -#! /bin/ash -# Xreset - run as root after session exits -# -export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/openslx/usr/sbin:/opt/openslx/usr/bin:/opt/openslx/sbin:/opt/openslx/bin" - -# Reassign ownership of the console to root, this should disallow -# assignment of console output to any random users's xterm. See Xstartup. -# -#chown root /dev/console -#chmod 622 /dev/console - -# XDM configurations typically have sessreg here. KDM has it built-in. - -# Use common Xreset framework if it exist -if [ -x /etc/X11/Xreset ] ; then - /etc/X11/Xreset -fi diff --git a/remote/modules/kdm/data/etc/kde4/kdm/Xsession b/remote/modules/kdm/data/etc/kde4/kdm/Xsession deleted file mode 100755 index 79d3a06d..00000000 --- a/remote/modules/kdm/data/etc/kde4/kdm/Xsession +++ /dev/null @@ -1,49 +0,0 @@ -#! /bin/ash -# Xsession - run as user -export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/openslx/usr/sbin:/opt/openslx/usr/bin:/opt/openslx/sbin:/opt/openslx/bin" - -session=$1 - -# Note that the respective logout scripts are not sourced. -case $SHELL in - */bash) - [ -z "$BASH" ] && exec $SHELL $0 "$@" - set +o posix - [ -f /etc/profile ] && . /etc/profile - if [ -f $HOME/.bash_profile ]; then - . $HOME/.bash_profile - elif [ -f $HOME/.bash_login ]; then - . $HOME/.bash_login - elif [ -f $HOME/.profile ]; then - . $HOME/.profile - fi - ;; - */zsh) - [ -z "$ZSH_NAME" ] && exec $SHELL $0 "$@" - emulate -R zsh - [ -d /etc/zsh ] && zdir=/etc/zsh || zdir=/etc - zhome=${ZDOTDIR:-$HOME} - # zshenv is always sourced automatically. - [ -f $zdir/zprofile ] && . $zdir/zprofile - [ -f $zhome/.zprofile ] && . $zhome/.zprofile - [ -f $zdir/zlogin ] && . $zdir/zlogin - [ -f $zhome/.zlogin ] && . $zhome/.zlogin - setopt shwordsplit noextendedglob - ;; - */csh|*/tcsh) - # [t]cshrc is always sourced automatically. - # Note that sourcing csh.login after .cshrc is non-standard. - xsess_tmp=`mktemp /tmp/xsess-env-XXXXXX` - $SHELL -c "if (-f /etc/csh.login) source /etc/csh.login; if (-f ~/.login) source ~/.login; /bin/sh -c 'export -p' >! $xsess_tmp" - . $xsess_tmp - rm -f $xsess_tmp - ;; - *) # Plain sh, ksh, and anything we do not know. - [ -f /etc/profile ] && . /etc/profile - [ -f $HOME/.profile ] && . $HOME/.profile - ;; -esac - -# invoke global X session script -. /etc/X11/Xsession - diff --git a/remote/modules/kdm/data/etc/kde4/kdm/Xsetup b/remote/modules/kdm/data/etc/kde4/kdm/Xsetup deleted file mode 100755 index 965f1f08..00000000 --- a/remote/modules/kdm/data/etc/kde4/kdm/Xsetup +++ /dev/null @@ -1,7 +0,0 @@ -#! /bin/ash -# Xsetup - run as root before the login dialog appears -export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/openslx/usr/sbin:/opt/openslx/usr/bin:/opt/openslx/sbin:/opt/openslx/bin" - -#xconsole -geometry 480x130-0-0 -notify -verbose -fn fixed -exitOnFail -file /dev/xconsole & - -#/sbin/initctl -q emit login-session-start DISPLAY_MANAGER=kdm diff --git a/remote/modules/kdm/data/etc/kde4/kdm/Xstartup b/remote/modules/kdm/data/etc/kde4/kdm/Xstartup deleted file mode 100755 index 5ca1683b..00000000 --- a/remote/modules/kdm/data/etc/kde4/kdm/Xstartup +++ /dev/null @@ -1,19 +0,0 @@ -#! /bin/ash -# Xstartup - run as root before session starts - -export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/openslx/usr/sbin:/opt/openslx/usr/bin:/opt/openslx/sbin:/opt/openslx/bin" - -if [ -e /etc/nologin ]; then - # always display the nologin message, if possible - if [ -s /etc/nologin ] && which xmessage > /dev/null 2>&1; then - xmessage -file /etc/nologin -geometry 640x480 - fi - if [ "$(id -u)" != "0" ] && \ - ! grep -qs '^ignore-nologin' /etc/kde4/kdm/kdm.options; then - exit 1 - fi -fi - -#/sbin/initctl -q emit desktop-session-start DISPLAY_MANAGER=kdm USER=$USER - -# NOTE: The session is aborted if the last command returns non-zero. diff --git a/remote/modules/kdm/data/etc/kde4/kdm/kdmrc b/remote/modules/kdm/data/etc/kde4/kdm/kdmrc index 1b59915a..88139796 100644 --- a/remote/modules/kdm/data/etc/kde4/kdm/kdmrc +++ b/remote/modules/kdm/data/etc/kde4/kdm/kdmrc @@ -33,13 +33,13 @@ SessionsDirs=/opt/openslx/xsessions # Session is executed to start the user's session (as the user) # "One of the keywords failsafe, default or custom, or a string to eval by a Bourne-compatible shell is passed as the first argument." -Session=/etc/kde4/kdm/Xsession +Session=/etc/X11/Xsession # Reset is run after a session terminates (as root) -Reset=/etc/kde4/kdm/Xreset +Reset=/etc/X11/Xreset # Setup is executed once before the greeter starts (as root) -Setup=/etc/kde4/kdm/Xsetup +Setup=/etc/X11/Xsetup # Startup is executed on successful authentication, before the session is opened (as root) -Startup=/etc/kde4/kdm/Xstartup +Startup=/etc/X11/Xstartup [Shutdown] AllowFifo=false diff --git a/remote/modules/kernel/kernel.build b/remote/modules/kernel/kernel.build index ae1b7694..197935f7 100644 --- a/remote/modules/kernel/kernel.build +++ b/remote/modules/kernel/kernel.build @@ -27,9 +27,6 @@ fetch_source() { pinfo "aufs detected in kernel source :)" fi - # fix pc speaker - ./patch-speaker - # remember the current kernel version echo "${KERNEL_CURRENT_VERSION}" > ksrc/KVERSION diff --git a/remote/modules/pam/data/etc/pam-script/pam_script_ses_close b/remote/modules/pam/data/etc/pam-script/pam_script_ses_close new file mode 120000 index 00000000..f3682056 --- /dev/null +++ b/remote/modules/pam/data/etc/pam-script/pam_script_ses_close @@ -0,0 +1 @@ +/opt/openslx/scripts/pam_script_ses_close
\ No newline at end of file diff --git a/remote/modules/pam/data/etc/pam-script/pam_script_ses_open b/remote/modules/pam/data/etc/pam-script/pam_script_ses_open new file mode 120000 index 00000000..4f5598e5 --- /dev/null +++ b/remote/modules/pam/data/etc/pam-script/pam_script_ses_open @@ -0,0 +1 @@ +/opt/openslx/scripts/pam_script_ses_open
\ No newline at end of file diff --git a/remote/modules/pam/data/opt/openslx/scripts/pam_script_ses_close b/remote/modules/pam/data/opt/openslx/scripts/pam_script_ses_close index 535cd0d6..198d2efe 100755 --- a/remote/modules/pam/data/opt/openslx/scripts/pam_script_ses_close +++ b/remote/modules/pam/data/opt/openslx/scripts/pam_script_ses_close @@ -13,6 +13,10 @@ slxlog "session-close" "$PAM_USER logged out on $PAM_TTY" OPENSESSION=$(loginctl show-user "$PAM_USER" | grep "Sessions=" | cut -c 10-) SESSIONCOUNT=$(echo "$OPENSESSION" | wc -w) +# When using su/sudo there is no session created, so count up by one +if [ "x$PAM_SERVICE" = "xsu" -o "x$PAM_SERVICE" = "xsudo" ]; then + SESSIONCOUNT=$(( $SESSIONCOUNT + 1 )) +fi if [ "$SESSIONCOUNT" = "1" ]; then # last sessions, close all ghost user processes diff --git a/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt b/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt index 43880a2c..2d6dfb41 100755 --- a/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt +++ b/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt @@ -485,8 +485,8 @@ else fi if [ -z "$vm_diskfile" ]; then - new_vmpath=$(ls "${vmpath}.r"* | grep -E '\.r[0-9]+$' | grep -o -E '[0-9]+' | sort -n | tail -1) - [ -n "$new_vmpath" ] && vmpath="$vmpath$new_vmpath" + new_vmpath=$(ls "${vmpath}.r"* | grep -E -o '\.r[0-9]+$' | grep -o -E '[0-9]+' | sort -n | tail -1) + [ -n "$new_vmpath" ] && vmpath="${vmpath}.r${new_vmpath}" vm_diskfile="$vmpath" fi diff --git a/remote/modules/vmchooser/data/opt/openslx/vmchooser/sessionstart b/remote/modules/vmchooser/data/opt/openslx/vmchooser/sessionstart new file mode 100755 index 00000000..aa7e54c6 --- /dev/null +++ b/remote/modules/vmchooser/data/opt/openslx/vmchooser/sessionstart @@ -0,0 +1,10 @@ +#!/bin/ash + +SOURCEPATH="/opt/openslx/vmchooser/sessionstart.d" + +if [ -d "$SOURCEPATH" ]; then + for file in $SOURCEPATH/*; do + . "$file" || slxlog "vmchooser-sessionstart" "Could not source $file at session start!" "$file" + done +fi + diff --git a/remote/modules/vmchooser/vmchooser.build b/remote/modules/vmchooser/vmchooser.build index 58f5986e..eb0a2d48 100644 --- a/remote/modules/vmchooser/vmchooser.build +++ b/remote/modules/vmchooser/vmchooser.build @@ -1,4 +1,3 @@ -#!/bin/bash fetch_source() { git clone "${REQUIRED_GIT}" src diff --git a/remote/modules/xorg/data/etc/X11/Xreset b/remote/modules/xorg/data/etc/X11/Xreset index a77cf2c0..4ed680ce 100755 --- a/remote/modules/xorg/data/etc/X11/Xreset +++ b/remote/modules/xorg/data/etc/X11/Xreset @@ -1,10 +1,11 @@ -#!/bin/sh +#!/bin/ash # # /etc/X11/Xreset # -# global Xreset file -- for use by display managers +# Xreset - run as root after session exits +# -# $Id: Xsession 967 2005-12-27 07:20:55Z dnusinow $ +export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/openslx/usr/sbin:/opt/openslx/usr/bin:/opt/openslx/sbin:/opt/openslx/bin" set -e diff --git a/remote/modules/xorg/data/etc/X11/Xsession b/remote/modules/xorg/data/etc/X11/Xsession index dc64cf77..914dd2e8 100755 --- a/remote/modules/xorg/data/etc/X11/Xsession +++ b/remote/modules/xorg/data/etc/X11/Xsession @@ -1,4 +1,12 @@ #!/bin/ash +# +# /etc/X11/Xsession +# +# Xsession is executed to start the user's session (as the user) +# + +export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/openslx/usr/sbin:/opt/openslx/usr/bin:/opt/openslx/sbin:/opt/openslx/bin" + #Workaround to start Xsession. The original Xsession script includes error handling functionality and sources other scrips from the Xsession.d/ directory. diff --git a/remote/modules/xorg/data/etc/X11/Xsetup b/remote/modules/xorg/data/etc/X11/Xsetup new file mode 100755 index 00000000..524f7d84 --- /dev/null +++ b/remote/modules/xorg/data/etc/X11/Xsetup @@ -0,0 +1,16 @@ +#!/bin/ash +# +# /etc/X11/Xsetup +# +# Xsetup is executed once before the greeter starts (as root) +# + +export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/openslx/usr/sbin:/opt/openslx/usr/bin:/opt/openslx/sbin:/opt/openslx/bin" + +SESSIONDIR="/etc/X11/Xsetup.d" + +if [ -d "$SESSIONDIR" ]; then + for file in $SESSIONDIR/*; do + . $file || slxlog "xsetup" "Xsetup: Could not source $file" "$file" + done +fi diff --git a/remote/modules/xorg/data/etc/X11/Xstartup b/remote/modules/xorg/data/etc/X11/Xstartup new file mode 100755 index 00000000..5631fa65 --- /dev/null +++ b/remote/modules/xorg/data/etc/X11/Xstartup @@ -0,0 +1,12 @@ +#!/bin/ash +# +# /etc/X11/Xstartup +# +# Xstartup is executed on successful authentication, before the session is opened (as root) +# + +export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/openslx/usr/sbin:/opt/openslx/usr/bin:/opt/openslx/sbin:/opt/openslx/bin" + + + + diff --git a/remote/rootfs/rootfs-stage31/data/bin/setup_network b/remote/rootfs/rootfs-stage31/data/bin/setup_network index 06b46200..f7746c71 100755 --- a/remote/rootfs/rootfs-stage31/data/bin/setup_network +++ b/remote/rootfs/rootfs-stage31/data/bin/setup_network @@ -66,6 +66,15 @@ for LINE in $IP_OUT; do # youdev echo "SUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS==\"?*\", ATTR{address}==\"$IFMAC\", ATTR{dev_id}==\"0x0\", ATTR{type}==\"1\", KERNEL==\"eth*\", NAME=\"$IFACE\"" >> "${FUTURE_ROOT}/etc/udev/rules.d/70-net-boot-nic-name.rules" # continue... + echo -n "Wait for interface $BRIDGE: " + while true; do + # check linkstate + [ "x$(cat /sys/class/net/${BRIDGE}/operstate)" == "xup" ] && break + # else + echo -n "." + sleep 1 + done + echo "." IFACE="" done diff --git a/remote/rootfs/rootfs-stage32/rootfs-stage32.conf b/remote/rootfs/rootfs-stage32/rootfs-stage32.conf index b59a8237..f9d0ebae 100644 --- a/remote/rootfs/rootfs-stage32/rootfs-stage32.conf +++ b/remote/rootfs/rootfs-stage32/rootfs-stage32.conf @@ -3,6 +3,7 @@ REQUIRED_MODULES=" " REQUIRED_BINARIES=" bash + dmesg curl less agetty diff --git a/server/configs/freiburg/beamer-freiburg b/server/configs/freiburg/beamer-freiburg new file mode 120000 index 00000000..d59c77af --- /dev/null +++ b/server/configs/freiburg/beamer-freiburg @@ -0,0 +1 @@ +../../modules/beamer-freiburg/
\ No newline at end of file diff --git a/server/modules/beamer-freiburg/opt/openslx/beamergui/beamer.conf b/server/modules/beamer-freiburg/opt/openslx/beamergui/beamer.conf new file mode 100644 index 00000000..52fc0033 --- /dev/null +++ b/server/modules/beamer-freiburg/opt/openslx/beamergui/beamer.conf @@ -0,0 +1,2 @@ +[SpecificSettings] +132.230.4.100=1280x800 diff --git a/server/modules/cups-freiburg/etc/cups/ppd/RZFARBE.ppd b/server/modules/cups-freiburg/etc/cups/ppd/RZFARBE.ppd index 4ca096d0..e649b392 100644 --- a/server/modules/cups-freiburg/etc/cups/ppd/RZFARBE.ppd +++ b/server/modules/cups-freiburg/etc/cups/ppd/RZFARBE.ppd @@ -2486,7 +2486,7 @@ *OpenUI *Duplex/2-Sided Print: PickOne *OrderDependency: 10 AnySetup *Duplex -*DefaultDuplex: None +*DefaultDuplex: DuplexNoTumble *Duplex None/1-Sided Print: " (<<) cvx exec /Duplex false /Tumble false (>>) cvx exec setpagedevice" *End diff --git a/server/modules/pam-freiburg/opt/openslx/scripts/pam_script_mount_persistent b/server/modules/pam-freiburg/opt/openslx/scripts/pam_script_mount_persistent index f6a295f2..d8808f66 100644 --- a/server/modules/pam-freiburg/opt/openslx/scripts/pam_script_mount_persistent +++ b/server/modules/pam-freiburg/opt/openslx/scripts/pam_script_mount_persistent @@ -30,22 +30,26 @@ if [ $(id -g ${PAM_USER}) -ge 1000 ]; then # now we can mount the home directory! - MOUNT_OPTS="-t nfs4 -o rw,nosuid,nodev,nolock,intr,hard,sloppy,sec=krb5p" - - SIGNAL=$(mktemp) - rm -f -- "${SIGNAL}" - (mount ${MOUNT_OPTS} "${FILESERVER}:${VOLUME}" "${PERSISTENT_HOME_DIR}" || touch "${SIGNAL}") & - MOUNT_PID=$! - for COUNTER in 1 2 4 4; do - kill -0 "${MOUNT_PID}" 2>/dev/null || break - sleep "${COUNTER}" - done - - if [ -e "${SIGNAL}" ] || kill -9 "${MOUNT_PID}" 2>/dev/null; then - slxlog "pam-freiburg" "Mount of '${FILESERVER}:${VOLUME}' to '${PERSISTENT_HOME_DIR}' failed. (Args: ${MOUNT_OPTS})" - rm -f -- "${SIGNAL}" - else - exit 0 - fi + MOUNT_OPTS="-t nfs4 -o rw,nosuid,nodev,nolock,intr,hard,sloppy" + if echo "$FILESERVER" | grep -q "sunfs6"; then + MOUNT_OPTS="${MOUNT_OPTS},sec=krb5i" + else + MOUNT_OPTS="${MOUNT_OPTS},sec=krb5p" + fi + + SIGNAL=$(mktemp) + rm -f -- "${SIGNAL}" + ( mount ${MOUNT_OPTS} "${FILESERVER}:${VOLUME}" "${PERSISTENT_HOME_DIR}" > "/tmp/home.$PAM_USER" 2>&1 || touch "${SIGNAL}" ) & + MOUNT_PID=$! + for COUNTER in 1 2 4 4; do + kill -0 "${MOUNT_PID}" 2>/dev/null || break + sleep "${COUNTER}" + done + + if [ -e "${SIGNAL}" ] || kill -9 "${MOUNT_PID}" 2>/dev/null; then + slxlog "pam-freiburg" "Mount of '${FILESERVER}:${VOLUME}' to '${PERSISTENT_HOME_DIR}' failed. (Args: ${MOUNT_OPTS})" "/tmp/home.$PAM_USER" + rm -f -- "${SIGNAL}" + fi + rm -f -- "/tmp/home.$PAM_USER" fi |
