How could I set term at login

Bob McGowen x4312 dept208 bob at wyse.wyse.com
Fri Mar 1 12:04:14 AEST 1991


In article <1991Feb23.173043.3526 at ugle.unit.no> arnej at 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 at lise.unit.no   -- internet mail please        -- hacker -
>Arne.Juul at unit.no    -- X/400 mail for sadists      --    I   -
>juul at 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 at wyse.com



More information about the Comp.unix.admin mailing list