Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!lll-winken!unixhub!linac!att!pacbell.com!tandem!zorch!vsi1!wyse!bob From: bob@wyse.wyse.com (Bob McGowen x4312 dept208) Newsgroups: comp.unix.admin Subject: Re: How could I set term at login Keywords: tset, .login Message-ID: <3124@wyse.wyse.com> Date: 1 Mar 91 01:04:14 GMT References: <476@bria> <1991Feb21.022452.18693@msuinfo.cl.msu.edu> <1991Feb23.173043.3526@ugle.unit.no> Sender: news@wyse.wyse.com Reply-To: bob@wyse.UUCP (Bob McGowen x4312 dept208) Organization: Wyse Technology Lines: 64 In article <1991Feb23.173043.3526@ugle.unit.no> arnej@solan1.solan.unit.no writes: >At our site we use the tset program. This is not as >transparent to users as it might have been, but it works ^^^^^^^^^^^ Why? If set up corrctly it can be, I think. ---deleted discussion of default terminal type and Cshell script ---for checking various terminal types. Why not let tset do it? It has a -m option to map terminal types based on a database in /etc, which under XENIX and SysV/386 is called _ttytype_. I use the following line to check for defined types (XENIX system). In the case where the type is unkown or dialup or switch (or any other generic name), you can ask the user for input or select for that user a particular terminal type: eval `tset -m ansi:ansi -m switch:wy60 -m dialup:\?vt100 \ -m :\?vt100 -s -Q` In /etc/ttytype the following lines exist: ansi console ansi tty01 ... ... ansi tty12 unknown tty1a dialup tty1A ... ... switch tty5a switch tty5b ... ... If I log in on the console or virtual tty's, I will get type ansi; logging in over the data switch will give me wy60, no questions; dialing in via modem I usually use Procomm in vt100 emulation but could be using cu from some other UNIX system, so tset asks me if vt100 is ok, CR accepts or type in what I want; if there is nothing to match in any preceding -m, use the last one to ask if I am using a vt100. An advantage of tset on a XENIX (BSD too??) system is that it will set the env. variable TERMCAP equal to the termcap entry for the terminal defined. Any program that wants to can now get this from the environment without re-reading a termcap file. tset does not do this under SysV/386, it only sets TERM. The -s option is required for this to work. tset generates output to set and export the variables (it will make setenv commands if you use the csh). The -Q option makes it totally quiet, no output is done unless the \? map option is hit. >Regards, Arne H. Juul, system administrator solan.unit.no > >arnej@lise.unit.no -- internet mail please -- hacker - >Arne.Juul@unit.no -- X/400 mail for sadists -- I - >juul@norunit.bitnet -- bitnet mail if you have to. -- hope - Bob McGowan (standard disclaimer, these are my own ...) Product Support, Wyse Technology, San Jose, CA ..!uunet!wyse!bob bob@wyse.com