#!/bin/sh

#########################################################################
# ChangeLog: 	
#		Mar 03 /2003
#		- Added ventana-running state program
#			- See /home/ventana/source/ventana-running.c
#		Nov 7, 2005,  added ../k9linux
######################################################################### 


echo "hello ventana"

#disable the screensavers
xset s noblank
xset s noexpose
xset s reset
xset s off
xset s 0
#../k9linux
export GNOME2

gnome-spawned

if [ $? = 0 ]; then

	echo "gnome and xtouch has not been spawned"
	
	# Update display  
	export DISPLAY=":0.0"

	echo "if you need to calibrate the first touch screen, run /usr/lib/tsi/setup"
	if cd /usr/lib/tsi; then
	 	./xtouch&
	fi
	
	export DISPLAY=":0.1"
	gnome-session&

	echo "if you need to calibrate the second touch screen, run /usr/lib/tsi2/setup"
	if cd /usr/lib/tsi2; then
		./xtouch2&
	fi

	gnome-spawned 1

else
	echo "gnome and xtouch has already been spawned"
fi


export DISPLAY=":0.0"

if cd /home/ventana/source; then
#	/opt/sbin/insmod -f ./c++/analog_interface/AIO16.o
#	/opt/sbin/insmod -f ./c++/analog_interface/AIO16B.o
#	/opt/sbin/insmod -f ./c++/digital_interface/PCIO.o
	./mywish script.tcl&

fi


export DISPLAY=":0.2"

