:
#
# .profile	-- Commands executed by a login ODT shell
#
#	@(#) profile 1.1 89/02/15 
#
# Copyright (c) 1985-89, The Santa Cruz Operation, Inc.
# All rights reserved.
#
# This Module contains Proprietary Information of the Santa Cruz
# Operation, Inc., and should be treated as Confidential. 
#

# set PATH only if not already set
PATH=$PATH:/usr/altos/bin:/altos/bin:$HOME/bin:.
MAIL=/usr/spool/mail/`logname`		# mailbox location
export PATH MAIL

umask 077				# set file creation mask

eval `tset -m ansi:ansi -m $TERM:\?${TERM:-ansi} -r -s -Q`

HOST="`uname -n`"
USER="`logname`"
PS1="[$HOST!!$USER] "
EDITOR=/usr/bin/vi
PAGER=/usr/bin/more
export HOST USER PS1 EDITOR PAGER

# create Xhibit trash directory if it doesn't already exist
[ -d $HOME/Trash ] || mkdir $HOME/Trash
# clean up Trash
if [ -d Trash ]
then
	cd Trash
	rm -rf *
	cd
fi

#
# Start X and xhibit if it isn't started yet.
# When they stop you want to exit.
tty="`tty | sed 's;/dev/tty;;'`"
case $tty in
	[01][0-9])
		if ps -t$tty | (grep xdt > /dev/null)
		then :
		else
			startx 
			exit
		fi
		;;
esac
