Path: utzoo!yunexus!geac!syntron!jtsv16!uunet!convex!killer!pollux!dalsqnt!usl!usl-pc!jpd From: jpd@usl-pc.usl.edu (DugalJP) Newsgroups: comp.unix.questions Subject: Re: using set term in the .login file Keywords: vt52 Message-ID: <76@usl-pc.usl.edu> Date: 25 Oct 88 16:15:27 GMT Article-I.D.: usl-pc.76 References: <1139@fredonia.UUCP> <140@iquery.UUCP> Reply-To: jpd@usl-pc.UUCP (DugalJP) Organization: Univ. of Southwestern La., Lafayette Lines: 44 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@usl.edu Computing Center US Mail: PO Box 42770 Lafayette, LA 70504 University of Southwestern LA. Tel. 318-231-6417 U.S.A.