.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
.SH DESCRIPTION
\&\fBTset\fR initializes terminals.
\fBTset\fR first determines the type of terminal that you are using.
.SH DESCRIPTION
\&\fBTset\fR initializes terminals.
\fBTset\fR first determines the type of terminal that you are using.
2. The value of the \fBTERM\fR environmental variable.
.PP
3. (BSD systems only.) The terminal type associated with the standard
2. The value of the \fBTERM\fR environmental variable.
.PP
3. (BSD systems only.) The terminal type associated with the standard
-error output device in the \fI/etc/ttys\fR file. (On Linux and
-System-V-like UNIXes, \fIgetty\fR does this job by setting
+error output device in the \fI/etc/ttys\fR file.
+(On System\-V-like UNIXes and systems using that convention,
+\fIgetty\fR does this job by setting
\fBTERM\fR according to the type passed to it by \fI/etc/inittab\fR.)
.PP
4. The default terminal type, ``unknown''.
.PP
\fBTERM\fR according to the type passed to it by \fI/etc/inittab\fR.)
.PP
4. The default terminal type, ``unknown''.
.PP
Finally, if the erase, interrupt and line kill characters have changed,
or are not set to their default values, their values are displayed to the
standard error output.
Finally, if the erase, interrupt and line kill characters have changed,
or are not set to their default values, their values are displayed to the
standard error output.
versus the other initialization.
If neither option is given, both are assumed.
.PP
versus the other initialization.
If neither option is given, both are assumed.
.PP
Do not display any values for the erase, interrupt and line kill characters.
Normally \fBtset\fR displays the values for control characters which
differ from the system's default values.
.TP
Do not display any values for the erase, interrupt and line kill characters.
Normally \fBtset\fR displays the values for control characters which
differ from the system's default values.
.TP
Print the sequence of shell commands to initialize the environment variable
\fBTERM\fR to the standard output.
See the section
.B SETTING THE ENVIRONMENT
for details.
.TP
Print the sequence of shell commands to initialize the environment variable
\fBTERM\fR to the standard output.
See the section
.B SETTING THE ENVIRONMENT
for details.
.TP
Resize the window to match the size deduced via \fBsetupterm\fP.
Normally this has no effect,
unless \fBsetupterm\fP is not able to detect the window size.
.PP
Resize the window to match the size deduced via \fBsetupterm\fP.
Normally this has no effect,
unless \fBsetupterm\fP is not able to detect the window size.
.PP
.
.SH SETTING THE ENVIRONMENT
It is often desirable to enter the terminal type and information about
the terminal's capabilities into the shell's environment.
.
.SH SETTING THE ENVIRONMENT
It is often desirable to enter the terminal type and information about
the terminal's capabilities into the shell's environment.
into the shell's environment are written to the standard output. If
the \fBSHELL\fR environmental variable ends in ``csh'', the commands
are for \fBcsh\fR, otherwise, they are for \fBsh\fR.
into the shell's environment are written to the standard output. If
the \fBSHELL\fR environmental variable ends in ``csh'', the commands
are for \fBcsh\fR, otherwise, they are for \fBsh\fR.
\fBnoglob\fR, leaving it unset. The following line in the \fB.login\fR
or \fB.profile\fR files will initialize the environment correctly:
.sp
\fBnoglob\fR, leaving it unset. The following line in the \fB.login\fR
or \fB.profile\fR files will initialize the environment correctly:
.sp
When \fBtset\fR is used in a startup script it is often desirable to
provide information about the type of terminal used on such ports.
.PP
When \fBtset\fR is used in a startup script it is often desirable to
provide information about the type of terminal used on such ports.
.PP
from some set of conditions to a terminal type, that is, to
tell \fBtset\fR
``If I'm on this port at a particular speed, guess that I'm on that
kind of terminal''.
.PP
from some set of conditions to a terminal type, that is, to
tell \fBtset\fR
``If I'm on this port at a particular speed, guess that I'm on that
kind of terminal''.
.PP
optional operator, an optional baud rate specification, an optional
colon (``:'') character and a terminal type. The port type is a
string (delimited by either the operator or the colon character). The
optional operator, an optional baud rate specification, an optional
colon (``:'') character and a terminal type. The port type is a
string (delimited by either the operator or the colon character). The
mappings are applied to the terminal type. If the port type and baud
rate match the mapping, the terminal type specified in the mapping
replaces the current type. If more than one mapping is specified, the
mappings are applied to the terminal type. If the port type and baud
rate match the mapping, the terminal type specified in the mapping
replaces the current type. If more than one mapping is specified, the
.PP
If no baud rate is specified, the terminal type will match any baud rate.
If no port type is specified, the terminal type will match any port type.
.PP
If no baud rate is specified, the terminal type will match any baud rate.
If no port type is specified, the terminal type will match any port type.
will cause any dialup port, regardless of baud rate, to match the terminal
type vt100, and any non-dialup port type to match the terminal type ?xterm.
Note, because of the leading question mark, the user will be
queried on a default port as to whether they are actually using an xterm
terminal.
.PP
will cause any dialup port, regardless of baud rate, to match the terminal
type vt100, and any non-dialup port type to match the terminal type ?xterm.
Note, because of the leading question mark, the user will be
queried on a default port as to whether they are actually using an xterm
terminal.
.PP
\fBtset\fR's most important use). This implementation behaves like 4.4BSD
tset, with a few exceptions specified here.
.PP
\fBtset\fR's most important use). This implementation behaves like 4.4BSD
tset, with a few exceptions specified here.
.PP
-The \fB-S\fR option of BSD tset no longer works; it prints an error message to stderr
-and dies. The \fB-s\fR option only sets \fBTERM\fR, not \fBTERMCAP\fP. Both these
+The \fB\-S\fR option of BSD tset no longer works; it prints an error message to stderr
+and dies. The \fB\-s\fR option only sets \fBTERM\fR, not \fBTERMCAP\fP. Both these
noisily rather than silently induce lossage).
.PP
There was an undocumented 4.4BSD feature that invoking tset via a link named
`TSET` (or via any other name beginning with an upper-case letter) set the
terminal to use upper-case only. This feature has been omitted.
.PP
noisily rather than silently induce lossage).
.PP
There was an undocumented 4.4BSD feature that invoking tset via a link named
`TSET` (or via any other name beginning with an upper-case letter) set the
terminal to use upper-case only. This feature has been omitted.
.PP
-The \fB-A\fR, \fB-E\fR, \fB-h\fR, \fB-u\fR and \fB-v\fR
+The \fB\-A\fR, \fB\-E\fR, \fB\-h\fR, \fB\-u\fR and \fB\-v\fR
options were deleted from the \fBtset\fR
utility in 4.4BSD.
None of them were documented in 4.3BSD and all are
of limited utility at best.
options were deleted from the \fBtset\fR
utility in 4.4BSD.
None of them were documented in 4.3BSD and all are
of limited utility at best.
not documented or useful, but were retained as they appear to be in
widespread use. It is strongly recommended that any usage of these
not documented or useful, but were retained as they appear to be in
widespread use. It is strongly recommended that any usage of these
-three options be changed to use the \fB-m\fR option instead. The
--n option remains, but has no effect. The \fB-adnp\fR options are therefore
+three options be changed to use the \fB\-m\fR option instead. The
+\fB\-n\fP option remains, but has no effect. The \fB\-adnp\fR options are therefore
arguments, although it is strongly recommended that such usage be fixed to
explicitly specify the character.
.PP
arguments, although it is strongly recommended that such usage be fixed to
explicitly specify the character.
.PP
-As of 4.4BSD, executing \fBtset\fR as \fBreset\fR no longer implies the \fB-Q\fR
-option. Also, the interaction between the - option and the \fIterminal\fR
+As of 4.4BSD, executing \fBtset\fR as \fBreset\fR no longer implies the \fB\-Q\fR
+option. Also, the interaction between the \- option and the \fIterminal\fR
argument in some historic implementations of \fBtset\fR has been removed.
.SH ENVIRONMENT
The \fBtset\fR command uses these environment variables:
argument in some historic implementations of \fBtset\fR has been removed.
.SH ENVIRONMENT
The \fBtset\fR command uses these environment variables: