#!/bin/sh # Kill any instance(s) of xwindows running kill -9 `ps auxw | egrep "/usr/bin/[s]tartx" | awk '{print $1}'` >/dev/null 2>&1 # Actually start XWindows (This triggers the initial 4 minute initialization of xwindows) # Afer this has successfully completed launching a skill will not set 4 minute load times # Also time how long it takes echo -n "Warming up X Windows... (Takes approximately 4 minutes, the first time after booting up a robot)" date1=$(date +"%s") startx /bin/echo "done" >/dev/null 2>&1 date2=$(date +"%s") diff=$(($date2-$date1)) echo echo "Warmup took $(($diff / 60))m$(($diff % 60))s." echo "Warmup complete."