3 # Author: Aaron Voisine <aaron@voisine.org>
6 TMP=/tmp/$UID/TemporaryItems
8 ps -wx -ocommand | grep -e '[X]11' > /dev/null
9 if [ "$?" != "0" -a ! -f ~/.xinitrc ]; then
10 echo "rm -f ~/.xinitrc" > ~/.xinitrc
11 sed 's/xterm/# xterm/' /usr/X11R6/lib/X11/xinit/xinitrc >> ~/.xinitrc
15 cp -f "$CWD/bin/getdisplay.sh" $TMP
17 open-x11 $TMP/getdisplay.sh || \
18 open -a XDarwin $TMP/getdisplay.sh || \
19 echo ":0" > $TMP/display
21 while [ "$?" == "0" -a ! -f $TMP/display ]; do sleep 1; done
22 export "DISPLAY=`cat $TMP/display`"
24 ps -wx -ocommand | grep -e '[X]11' > /dev/null || exit 11
27 exec "$CWD/bin/exporter" "$@"