# BIG DOG — greeting and optional autostart. # # Autostart is OFF by default. A game that starts on its own and then does not # release the console leaves a first-time visitor with no way back to a shell # except reloading the tab. Booting to a prompt cannot strand anyone. # # touch /home/.autostart turn autostart on # rm /home/.autostart turn it off again # # Why this file and not /etc/rc.local or /etc/profile: pid 1 IS bash (the # kernel cmdline says init=/bin/bash), so no init system runs an rc.local, and # bash starts interactive but NOT as a login shell, so /etc/profile is never # read. Both were tested, not assumed. HOME is "/", so this file is $HOME/.bashrc. if [ -f /home/.autostart ] && [ -z "$BIGDOG_STARTED" ]; then export BIGDOG_STARTED=1 echo "Starting BIG DOG in 3s - press ENTER for a shell instead." if read -t 3 -r _; then echo "Skipped." else bigdog fi fi echo "" echo " BIG DOG - a winged bulldog, drawn by a compiled renderer." echo "" echo " bigdog play it" echo " bigdog-demo watch it fly itself" echo "" echo " Type one of those HERE, in the console pane." echo " Then CLICK THE SCREEN PANE and press SPACE or W to flap, Q to quit." echo " Keys go to the Screen pane, not this one - the game reads the display's" echo " own keyboard (/dev/input/event0), because reading this console needs a" echo " tty ioctl that hangs on this kernel." echo "" echo " The IN counter on screen shows keypresses received. If it stays at 0," echo " the Screen pane does not have focus." echo ""