6 [ -n "${link}" ] && path=`dirname "${link}"`
10 *dedicated*) mode="dedicated" ;;
16 x86_64) arch="linux64" ;;
20 xonotic="xonotic-${arch}-${mode}"
22 set -- ./${xonotic} "${@}"
40 xserver="${VALUE%%/*}"
46 # now how do we execute it?
47 if [ -r ~/.xonotic/data/config.cfg ]; then
48 while read -r CMD KEY VALUE; do
54 done < ~/.xonotic/data/config.cfg
63 0:+vid_x11_display\ *)
64 setdisplay "${X#+vid_x11_display }"
79 echo "Not using display ':$xserver': evil characters"
87 # check for a listening X server on that socket
88 if netstat -nl | grep -F " /tmp/.X11-unix/X$xserver" >/dev/null; then
89 # X server already exists
90 export DISPLAY=:$xserver
91 prefix="DISPLAY=:$xserver "
92 msg=$msg$lf"- Running Xonotic on already existing display :$xserver"
94 set -- startx "$@" -fullscreen -- ":$xserver"
95 msg=$msg$lf"- Running Xonotic on a newly created X server :$xserver."
100 echo >&2 "Not using layout '$xlayout': evil characters"
104 set -- "$@" -layout "$xlayout"
105 msg=$msg$lf"- Using the ServerLayout section named $xlayout."
110 echo "X SERVER OVERRIDES IN EFFECT:$msg"
112 echo "Resulting command line:"
115 echo "To undo these overrides, edit ~/.xonotic/data/config.cfg and remove the line"
116 echo "starting with 'seta vid_x11_display'."
123 if [ -z "$SDL_AUDIODRIVER" ]; then
124 if ps -C pulseaudio >/dev/null; then
125 if ldd /usr/lib/libSDL.so 2>/dev/null | grep pulse >/dev/null; then
126 export SDL_AUDIODRIVER=pulse