TIMEOUT=20
PIDFILE=/var/run/autox.pid
+if [ -z "$1" ]; then
+ echo "Usage: $0 <username>" 1>&2
+ exit 1
+fi
+
echo $$ > $PIDFILE
trap "rm -f $PIDFILE; killall -9 startx" 0
fails=0
while true; do
start_time=`date "+%s"`
- openvt -w -- su -c startx olpc
+ openvt -w -- su -c startx $1
end_time=`date "+%s"`
timediff=$((end_time-start_time))