Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ tset.bsd(1) — Domain/IX SR9.2.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

TSET(1)

NAME

tset − terminal-dependent initialization

USAGE

tset [ options ]

DESCRIPTION

Tset initializes your terminal at login to a UNIX system.  It first determines the type of terminal involved.  Tset then does terminal dependent processing such as setting erase and kill characters, setting or resetting delays, and sending necessary initialization sequences.  The /etc/termcap database contains valid type names for terminals. 

If you do not specify any arguments, tset simply reads the terminal type out of the TERM environment variable, and then reinitializes the terminal.  You can incorporate tset in a start-up script such as .profile or .login if you use sh (1) or csh (1), respectively. 

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.  With csh (1), you may find it convenient to make the following alias in your .cshrc file:

alias tset ´setenv TERM `tset − \!*`´

This allows you to invoke the command tset 2621 at any time from the log-in C Shell.  These commands cause tset to place the name of your terminal in the TERM variable in the environment.  Refer to environ (7) for more information about the Shell environment. 

Note that it is impossible to get this aliasing effect with a Bourne Shell script, because Shell scripts cannot set the environment of their parent. 

Once the terminal type is known, tset engages in terminal driver mode setting.  This normally involves sending an initialization sequence to the terminal.  This sequence will set the single character erase (and, optionally, the line kill characters for full-line erase), and special character delays.  Tab and newline expansion are turned off during transmission of the terminal initialization sequence. 

On terminals that can backspace but not overstrike, and have a pound sign (#) as the default erase character, tset changes the erase character to a backspace. 

When a program dies and leaves a terminal in an abnormal state, you may have to invoke a reset (1) on the terminal to set cooked and echo modes, turn off cbreak and raw modes, turn on newline translation, and restore special characters to a sensible state before any terminal dependent processing is done. 

OPTIONS

−m [ident] [test baudrate]:type] ...type]
Map terminal type to port type, specifying the appropriate port type identifier, an optional baud rate specification, and the terminal type.  Using this option ensures that the particular type of port always assumes the specified kind of terminal.  If more than one mapping is specified, the first applicable mapping prevails.  A missing port type identifier matches all identifiers.  Any of the alternate generic names given in termcap (5) may be used for the identifier.  A baudrate may be specified as with stty (1), and is compared with the speed of the diagnostic output (which should be the control terminal).  The baud rate test may be any combination of: >, @, <, and !; @ means “at” and !  inverts the sense of the test.  To avoid problems with metacharacters, place the entire argument to −m within single quote (´) characters.  If you are using csh (1), also place a backslash (\) before any exclamation point (!) used here.  If the type finally determined by tset begins with a question mark (?), you are asked whether you really want that type.  A null response means “yes.” Otherwise, you can enter another type to be used instead.  If no mapping applies and you supply a final type without a −m on the command line, then that type is used. 

−ec Set the erase character to be the named character c on all terminals.  The default is the backspace character on the terminal, usually ↑H.  Either type the character c directly, or entered it using the ↑ notation. 

−kc Set the line kill character to be the named character c on all terminals.  The default is a CONTROL-X (↑X).  Either type the character c directly, or entered it using the ↑ notation. 

− Write the name of the terminal on the standard output.  This should be captured by the Shell and placed in the TERM environment variable.  For example, if you use the Bourne Shell, sh (1), specify the following:

export TERM; TERM=`tset − options...`

For the C Shell, csh (1), use this:

setenv TERM `tset - options...`

−n On systems with the Berkeley 4BSD TTY driver, initialize new TTY driver modes for this terminal.  For a CRT, set the CRTERASE and CRTKILL modes only if the baud rate is 1200 or greater.  Refer to tty (4) for more details. 

−I Suppress transmitting terminal initialization strings. 

−Q Suppress printing of the “Erase set to” and “Kill set to” messages. 

For compatibility with earlier versions of tset, the following other options are accepted, although their use is discouraged:

−Ec Set the erase character to c only if the terminal can backspace. 

− Print the terminal type on the standard output. 

−r Print the terminal type on the diagnostic output. 

FILES

/etc/termcapterminal capability database

RELATED INFORMATION

csh (1), sh (1), stty (1), termcap (5), environ (7). 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026