TSET(1) — Unix Programmer’s Manual
NAME
tset − set terminal modes
SYNOPSIS
tset [ options ] [ type ]
DESCRIPTION
Tset causes terminal dependent processing such as setting erase and kill characters, setting or resetting delays. It is driven by the /etc/ttytype and /etc/termcap files.
Tset is most useful when included in the .login (for csh(1)) or .profile (for sh(1)) file executed automatically at login, with −d used to specify the terminal type you most frequently dial in on.
There are gobs of exciting options. Most of them can be ignored most of the time. The options are listed in approximate order of importance, from the very important to the hopelessly obscure.
−d type If the terminal is a dialup set the type to type instead. This flag overrides the type parameter on the command line, so
tset −d adm3a hp2621
sets the type to “adm3a” if you are on a dialup and “hp2621” otherwise.
−p type Like −d, but for “plugboard” ports.
−b type Like −d, but for “bussiplexor” ports.
−a type Like −d, but for ARPANET telnet connections.
−ex Set the erase character to x. If x is omitted, set the erase character to the erase character for the terminal you are on (usually control-H). If this flag is omitted, this processing will only happen on terminals that can backspace and not overstrike.
−kx Sets the kill character to x. The default for x is control-X.
− Output the terminal type to the standard output. If this is the only argument specified, tset does no other processing.
−s Output setenv commands to set the TERM and TERMCAP variables. (See below.)
−h Do not look at the environment.
−r Output the terminal type to the diagnostic output. Useful for people who like to know what kind of terminal they are on.
−Q Be quiet. This supresses the output of the “Erase set to” and “Kill set to” messages.
−I Don’t do tab initialization. Useful when long startup strings are output and the terminal is already initialized.
−Ex Like −e, except this flag is ignored on terminals that cannot backspace at all. God help you if you have to use this flag; it only exists because out there somewhere an ASR-33 may still exist.
The type of the terminal you are on is divined from the environment unless the type argument is given or any of the −h, −d, −p, −a, or −b flags are given. If any of these are set, tset looks in the /etc/ttytype file for a type based on the port you are logged in on. The type may be any type given in /etc/termcap. If any type begins with a question mark, the user is asked if s/he really wants that type. A null response means to use that type; otherwise, another type can be entered which will be used instead. (The question mark should be escaped with \ to prevent filename expansion by the shell.) In the −e, −E, and −k flags, x can be replaced with “^X” where X is any character; this is equivalent to control-X.
The −s option outputs “setenv” commands (if your default shell is csh(1)) or “export” and assignment commands (if your default shell is sh(1)) it can be used as:
`tset −s ...`
[Actually, this is not possible because of a problem in the shells. Instead, use:
tset −s ... > /tmp/tset$$
source /tmp/tset$$
rm /tmp/tset$$
(If using sh(1) replace ‘source’ by ‘.’)]
For version 6 systems, tset gets the terminal type from the file /etc/htmp and updates it there. A special −u flag on version 6 systems suppresses any possible updating of /etc/htmp.
EXAMPLES
tset −dti733 −p \?hp2621 −e −k^U
`tset −dadm3a −s −e# −r`
tset gt42
FILES
/etc/htmpTerminal type database (version 6 only)
/etc/ttytypeTerminal id to type map database
/etc/termcapTerminal capability database
AUTHOR
Eric P. Allman
SEE ALSO
setenv(1), stty(1), ttytype(5), termcap(5)
BUGS
3rd Berkeley Distribution — 11/16/79