tset.1 (2010 09)
t
tset(1) tset(1)
NAME
tset, reset - terminal-dependent initialization
SYNOPSIS
tset [options ][-m [ident ][test baudrate ]
:type]... [type ]
reset
DESCRIPTION
tset sets up the terminal when logging in on an HP-UX system. It does terminal-dependent processing,
such as setting erase and kill characters, setting or resetting delays, and sending any sequences needed to
properly initialize the terminal. It first determines the type of terminal involved, then does the necessary
initializations and mode settings. The type of terminal attached to each HP-UX port is specified in the
/etc/ttytype data base. Type names for terminals can be found in the files under the
/usr/share/lib/terminfo
directory (see terminfo (4)). If a port is not wired permanently to a
specific terminal (not hardwired), it is given an appropriate generic identifier, such as
dialup.
reset performs a similar function, setting the terminal to a sensible default state.
In the case where no arguments are specified,
tset simply reads the terminal type out of the environ-
ment variable
TERM and re-initializes the terminal. The rest of this manual entry concerns itself with
mode and environment initialization, typically done once at login, and options used at initialization time
to determine the terminal type and set up terminal modes.
When used in a startup script (
.profile for sh(1), or .login for csh (1) users), it is desirable to give
information about the type of terminal that will normally be used on ports that are not hardwired. These
ports are identified in /etc/ttytype as dialup or plugboard, etc. To specify what terminal type
you usually use on these ports, the -m (map) option flag is followed by the appropriate port type
identifier, an optional baud rate specification, and the terminal type. (The effect is to "map" from some
conditions to a terminal type; that is, to tell tset that "If I am on this kind of port, I will probably be on
this kind of terminal.") If more than one mapping is specified, the first applicable mapping prevails. A
missing port type identifier matches all identifiers. A baudrate is specified as with
stty (see stty (1)),
and is compared with the speed of the diagnostic output (which should be the control terminal). The baud
rate test can be any combination of
>, =, <, @, and
!. @ is a synonym for =, and ! inverts the sense of
the test. To avoid problems with metacharacters, it is best to place the entire argument to
-m within sin-
gle quotes; users of csh (1) must also put a
\ before any ! used.
Thus,
tset -m ’dialup>300:2622’ -m ’dialup:2624’ -m ’plugboard:?2623’
causes the terminal type to be set to an HP 2622 if the port in use is a dialup at a speed greater than 300
baud, or to an HP 2624 if the port is otherwise a dialup (i.e., at 300 baud or less). If the type finally
determined by
tset begins with a question mark, the user is asked for verification that the type indi-
cated is really the one desired. A null response means to use that type; otherwise, another type can be
entered. Thus, in the above case, if the user is on a plugboard port, he or she will be asked whether or
not he or she is actually using an HP 2623.
If no mapping applies and a final type option, not preceded by a
-m, is given on the command line, that
type is used. Otherwise, the identifier found in the /etc/ttytype data base is taken to be the termi-
nal type. The latter should always be the case for hardwired ports.
It is usually desirable to return the terminal type, as finally determined by tset , and information about
the terminal’s capabilities to a shell’s environment. This can be done using the
-s option. From sh(1),
the command:
eval ‘tset -s options... ‘
or using the C shell, (csh(1)):
set noglob; eval ‘tset -s options... ‘
These commands cause tset to generate as output a sequence of shell commands which place the vari-
able TERM in the environment; see environ (5).
Once the terminal type is known,
tset engages in terminal mode setting. This normally involves send-
ing an initialization sequence to the terminal, setting the single character erase (and optionally the full
line erase or line-kill) characters, and setting special character delays. Tab and new-line expansion are
turned off during transmission of the terminal initialization sequence.
HP-UX 11i Version 3: September 2010 − 1 − Hewlett-Packard Company 1