Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83 (MC830919); site kvvax4.UUCP Path: utzoo!linus!decvax!mcvax!kvport!kvvax4!esa From: esa@kvvax4.UUCP (Esa K Viitala) Newsgroups: net.info-terms,net.unix-wizards Subject: Re: How do *you* identify terminals? Message-ID: <306@kvvax4.UUCP> Date: Sun, 4-Jan-70 04:59:59 EST Article-I.D.: kvvax4.306 Posted: Sun Jan 4 04:59:59 1970 Date-Received: Fri, 17-Feb-84 06:20:37 EST References: <6933@mgweed.UUCP> <1704@rlgvax.UUCP> <6971@mgweed.UUCP> Organization: Kongsberg Vaapenfabrikk, CTG, P.O Box 25, N-3601 Kongsberg, Norway Lines: 127 This is what we do in .profile: # set up for termcap database (temporary) TERM=`/usr/etc/termtype` export TERM tset .login: # set up terminal stuff set term=`/usr/etc/termtype` tset -Q and /usr/etc/termtype looks as follows (it's a bit heavy, but) we've got the LAN difficulties as well. We use Interactive System's INed screen editor and have to set up a profile file for it too. This is recognised by tty number suffix in the filename, as you will understand from the listing here: #!/bin/sh # @(#) termtype.sh 1.4 # * modified: Wed May 11 00:20:40 GMT+2:00 1983, by torj # To give info about (account)groups. # Modified: Jan 17 1984 by torj/D52, to print out accounts right. # set `/usr/etc/prgroup` echo -n " Current (account)group : $1 account: " > /dev/tty sed -n "/^$1:/s/.*:\([0-9][0-9-]*\),.*/\1/p" /etc/group > /dev/tty echo " Valid group(s):" > /dev/tty grep ",$USER" /etc/group | sed "s/:.*//" > /dev/tty echo " to change group use command 'accgrsw'" > /dev/tty tty=`who am i | awk {'print $2'}` INlib=/usr/lib/INed if test "$tty" = "console" then echo "You can't run a display editor from console" >/dev/tty echo "" ; # to clear TERM exit 0 fi while true do echo -n >/dev/tty " The following terminals are supported: 0 other 3x tdv2230x 1 tdv2115 4 intextII 1x tdv2115x 5 nokia210 2 tdv2215 6 vt100 What terminal type do you have? " read term case ${term} in 0 | "") term="" break ;; 1 | tdv2115 | 2115) term=2115 INtype=tdv2115.ied break ;; 1x | tdv2115x | 2115x) term=2115 INtype=tdv2115x.ied break ;; 2 | tdv2215 | 2215) term=2215 INtype=tdv2215.ied break ;; 3 | tdv2230 | 2230) term=2230 INtype=tdv2230.ied break ;; 3x | tdv2230x | 2230x) term=2230 INtype=tdv2230x.ied break ;; 4 | intextII | intextII) term=intext2 INtype=profile.it2 break ;; 5 | nokia | nokia210) term=nokia210 INtype=nokia.ied echo "Downloading the INed keyboard layout" >/dev/tty /usr/local/setterm >/dev/tty /dev/tty fi echo $term All bright ideas are welcome!! -- Esa K Viitala ({decvax,philabs}!mcvax!kvport!kvvax4!esa) A/S Kongsberg Vaapenfabrikk, CTG4, P.O.Box 25, N-3601 Kongsberg Norway