Home > Help Files > Unix > Login Files > Fancy Login

Fancy Login


GETTING FANCY

It is possible to get much fancier with the "tset" command options. For example, if you dial up from home with a TeleVideo terminal, but use a Modgraph from 1111 Etcheverry, then you might want a "tset" line in ".login" something like this:

set noglob
eval `tset -s -Q -m 'dialup:tvi912c' -m:modgraph`
unset noglob

The "-m" means "map if...". This translates roughly to, "If I am on a dialup, then use a terminal type of 'tvi912c', otherwise (the
extra "-m:") use a terminal type of "modgraph". (The colon after the "-m" is there because "tset" expects lines to be in the form of
"-m type-of-device:terminal-to-use", that is, "-m dialup:tvi912c". Since there is no "type-of-device", there is a null field before
the ":", resulting in "-m:").

Recall that since there is no "?" before any of the terminal types, "tset" will not ask you to confirm anything - it will go off by
itself and perform terminal initialization.

Of course, you may use any of the other standard "tset" options before the "-m" stuff.

ANOTHER EXAMPLE

Let us suppose a hypothetical character uses a 1200 baud modem with a TeleVideo 912C at his office, a 300 baud modem with a ADM-3A
at home, and otherwise logs in from the 1111 Etcheverry terminal room on a Modgraph terminal. His "tset" line in his ".login" line
might look something like:

set noglob
eval `tset -s -m 'dialup=300:adm3a' -m dialup:tvi912c -m:modgraph`
unset noglob

This means: "If I am on a dialup of 300 baud ('dialup=300'), then the terminal type should be an 'adm3a'. However, if I am on a dialup
which is *not* 300 baud (i.e., 1200 baud), the terminal type should be a 'tvi912c'. Otherwise, if I am not on a dialup at all, I must
be on a 'modgraph'."

This works because the "-m" flags of "tset" are searched until one works. That is, in the above example, a person on a dialup at
1200 baud would not match "dialup=300", so it would go on. The next "-m" flag it sees is "dialup". Since the person *is* on a dialup,
it would take the "tvi912c" as the terminal type.

FOR MORE INFORMATION

For those of you not faint at heart, a complete description of all the wonderful (and oftentimes useless) options of "tset" can be
found by giving the command "man tset".

 

 


Comments to consult@newton.berkeley.edu
© 1998-2009 UC Regents