Logout from inside Suntools

VLD/VMB moss at BRL.MIL
Wed Nov 23 01:13:06 AEST 1988


This works well for me in my .profile:

case $TERM in
sun)	case "`tty`" in
	/dev/console)	wait
			echo "suntools ? \c"
			read answer junk
			case $answer in
			[nN]*)	;;
			*)	/usr/bin/suntools;
				exec ${SHELL} $HOME/.logout;;
			esac;;
	esac;;
esac


If you want suntools, hit <return> to the "suntools ? " prompt, otherwise
a 'n' or 'N' will allow you to avoid it (I don't like typing interrupts at my
.profile, but that way works fine too).  The key is the  'exec' of .logout
which replaces your login shell, logging you out.

-moss



More information about the Comp.unix.questions mailing list