#!/bin/sh
# Check environment and start tutorial.

if [ "`tty`" != "/dev/console" ]; then
	echo
	echo "To run the OpenWindows tutorial with the animated demonstrations"
	echo "you must start 'start_tutorial' from a local machine's console."
	echo "You are either remotely logged in to this machine or you are"
	echo "already running a window system."
	echo
	exit 1
fi

if [ -z "$OPENWINHOME" ]; then
	OPENWINHOME=/usr/openwin
fi

TUTORIAL_HOME=${TUTORIAL_HOME:-$OPENWINHOME/demo/tutorial}
HOME=${TUTORIAL_HOME}
export TUTORIAL_HOME HOME

( $OPENWINHOME/bin/openwin -defeateventsecurity -noauth )
