using set term in the .login file

DugalJP jpd at usl-pc.usl.edu
Wed Oct 26 02:15:27 AEST 1988


tset is fine when each port has a known terminal type connected to it.
The file (in BSD4.2) /etc/ttytype gives the correspendence, which tset
can test.  However, at USL we have a network that randomly picks a port
such that we don't know in advance which terminal type is going to be
used.  We use a modified form of the qterm program to ask the terminal
what is its type, and resort to tset of the terminal doesn't respond.
So here's what our .login file looks like:
...
# If $term is different from the defaults in /etc/ttytype, use it:
# Also handle any special cases.
switch ($term)
case pcvt:
	if (${HOST} == usl) then
		set term=`tset - vt102`
	else
		tset
	endif
	breaksw
case network:
case switch:
case ouinet:
case unknown:
	set term=`/usr/local/bin/qterm -q`
	if ($term == dumb) then
		set term=`tset - -m 'network:?nansipc' -m 'switch:?pcvt' '?pcvt' -Q`
	else
		setenv TERM $term
		tset
	endif
	breaksw

default:
	tset; breaksw
endsw

------------------------------------------
Hope this helps!
-- James

-- 
-- James Dugal,	N5KNX		USENET: ...!{dalsqnt,killer}!usl!jpd
Associate Director		Internet: jpd at usl.edu
Computing Center		US Mail: PO Box 42770  Lafayette, LA  70504
University of Southwestern LA.	Tel. 318-231-6417	U.S.A.



More information about the Comp.unix.questions mailing list