From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,c2dbfc82909a9efe X-Google-Attributes: gidfee84,public From: Mark Greene Subject: Re: terminal type and terminfo Date: 1996/12/16 Message-ID: <32B5BF82.7A3A@hlthsrc.com>#1/1 X-Deja-AN: 204421067 references: <19961216180301.NAA16076@ladder01.news.aol.com> to: Saimcplus content-type: text/plain; charset=us-ascii organization: Healthsource, Inc. mime-version: 1.0 newsgroups: comp.unix.osf.osf1 x-mailer: Mozilla 2.02 (Win16; I) Saimcplus wrote: > > Does anyone know of a way to prompt a user for their terminal type in > their .login/.profile and then use terminfo as the source? I know how to > do it with tset > and the termcap file but termcap does not have an entry for viewpoint and > that is what I need. Or does anyone have a good viewpoint entry for > termcap? > > Thanks, > Melissa > > saimcplus@aol.com Here is the vp terminfo setup we are currently using: vp|av|vwpt|viewpoint|Adds viewpoint, bw, am, cols#80, lines#24, bel=^G, cr=\r, clear=\f, el=\EK, ed=\Ek, hpa=^P%p1%{10}%/%{16}%*%p1%{10}%m%+%c, cup=\EY%p1%' '%+%c%p2%' '%+%c, civis=^W, cub1=\b, cnorm=^X, cuf1=^F, ll=^A, cuu1=^Z, prot=^N, sgr0=^O, kbs=\b, kclr=\f, kcud1=\n, kel=\EK, ked=\Ek, kf1=^B1\r, kf2=^B2\r, kf3=^B3\r, kf4=^B!\r, kf5=^B"\r, kf6=^B#\r, kcub1=^U, kll=^A, kcuf1=^F, kcuu1=^Z, lf1=F1, lf2=F2, lf3=F3, lf4=shift F1, lf5=shift F2, lf6=shift F3, pad=\200, mc4=^T, mc5=^R, vpa=^K%p1%' '%+%c, ind=\n, macs, ldul=+, ldur=+, ldbl=+, ldbr=+, ldvl=|, ldvr=|, ldht=-, ldhb=-, ldtd=+, ldtu=+, ldtr=+, ldtl=+, ldtc=+, ldvc=|, ldhc=-, bs=\b, lf=\n, smwp=^N, rmwp=^O, kefun=2, keesc=27, kexit=10;13, kebs=8, kebck=21, kefwd=6, keeol=107, keera=139, smlck=^D, rmlck=^B, pnorm=\E0@, prev=\E0P, pblnk=\E0B, pulin=\E0`, pdim=\E0A, pinv=\E0D, pso=\E0Q, at1=\f, at2=\EY\s\s, at3=\Ek, at4=\EK, at6=^O, at7=^N, at8=^O, at9=\b, at10=^Z, at12=^O, at14=^O, at16=^O, at23=^R, at24=^T, at31=^X, at32=^W, at34=^F, at42=^D, at43=^B, at48=\n, at59=^O, at61=^O, at70=^P%p1%{10}%/%{16}%*%p1%{10}%m%+%c, at75=^O, and for dynamically setting the term, this is from our standard .profile (we are using ksh as the default shell), try this: # get the logon to set the term type notvalid=0 while [ $notvalid = 0 ] do date echo "Please Logon to DEC Alpha - \007\c" read login case "$login" in NLG) TERM=vt220; export TERM notvalid=1;; LG) TERM=vp; export TERM notvalid=1;; PLG) TERM=vwpt; export TERM notvalid=1;; OFF) exit;; EXIT) exit;; *) echo "Invalid Logon; 'OFF' or 'EXIT' to abort \007\c" sleep 2;; esac done unset notvalid Hope that this helps. MJG