Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ tset(1) — 4D1 2.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

csh(1)

reset(1)

sh(1)

stty(1)

environ(4)

ttytype(4)

termcap(4)



     TSET(1)                                                   TSET(1)



     NAME
          tset - terminal dependent initialization

     SYNOPSIS
          tset [ options ]

     DESCRIPTION
          Tset causes terminal dependent processing such as setting
          erase and kill characters, setting or resetting delays, and
          the like.  It first determines the type of terminal
          involved, names for which are specified by the
          /usr/lib/terminfo data base, and then does necessary
          initializations and mode settings.  In the case where no
          argument types are specified, tset simply reads the terminal
          type out of the environment variable TERM and re-initializes
          the terminal.  The rest of this manual concerns itself with
          type initialization, done typically 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) users)
          or ".login" (for csh(1) users), it is desirable to give
          information about the types of terminal usually used, for
          terminals which are connected to the computer through a
          modem.  These ports are initially identified as being dialup
          or plugboard or arpanet etc.  To specify what terminal type
          is usually used on these ports, -m is followed by the
          appropriate port type identifier, an optional baud-rate
          specification, and the terminal type to be used if the
          mapping conditions are satisfied.  If more than one mapping
          is specified, the first applicable mapping prevails.  A
          missing type identifier matches all identifiers.

          Baud rates are specified as with stty(1), and are compared
          with the speed of the diagnostic output (which is almost
          always the control terminal).  The baud rate test may 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 '' characters; users of csh(1) must also put a "\"
          before any "!" used here.

          Thus

               tset -m 'dialup>300:adm3a' -m dialup:dw2

          causes the terminal type to be set to an adm3a if the port
          in use is a dialup at a speed greater than 300 baud; to a
          dw2 if the port is (otherwise) a dialup (i.e., at 300 baud
          or less).  If the type above begins with a question mark,
          the user is asked if the user really wants that type.  A
          null response means to use that type; otherwise, another



     Page 1                                        (last mod. 8/20/87)





     TSET(1)                                                   TSET(1)



          type can be entered which will be used instead.  For other
          ports the port type will be taken from the /etc/ttytype file
          or a final, default type option may be given on the command
          line not preceded by a -m.  A ttytype may be preceded with a
          question mark in /etc/ttytype for prompting (this is an
          enhancement over standard tset).

          It is often desirable to return the terminal type, as
          specified by the -m options, and information about the
          terminal to a shell's environment.  This can be done using
          the -s option; using the Bourne shell, sh(1):

               eval `tset -s options ... `

          or using the C shell, csh(1):

               tset /-s options ... > tset$$
               source tset$$
               rm tset$$

          These commands cause tset to generate as output a sequence
          of shell commands which place the variables TERM and TERMCAP
          in the environment; see environ(4).

          Once the terminal type is known, tset engages in terminal
          mode setting.  This normally involves sending an
          initialization sequence to the terminal and setting the
          single character erase (and optionally the line-kill (full
          line erase)) characters.

          On terminals that can backspace but not overstrike (such as
          a CRT), and when the erase character is the default erase
          character (``#'' on standard systems), the erase character
          is changed to a ^H (backspace).

          Other options are:

          -e  set the erase character to be the named character c on
              all terminals, the default being the backspace character
              on the terminal, usually ^H.

          -k  is similar to -e but for the line kill character rather
              than the erase character; c defaults to ^X (for purely
              historical reasons); ^U is the preferred setting.  No
              kill processing is done if -k is not specified.

          -I  suppresses outputting terminal initialization strings.

          -Q  suppresses printing the ``Erase set to'' and ``Kill set
              to'' messages.

          -S  Outputs just the strings to be assigned to TERM and



     Page 2                                        (last mod. 8/20/87)





     TSET(1)                                                   TSET(1)



              TERMCAP rather than commands for a shell.

     EXAMPLES
          A typical csh ".login" file using tset would be:

               set noglob
               set tmp = (tset /-e /-S /-r /-d?h19)
               setenv TERM "$tmp[1]"
               unset tmp noglob

          This ".login" sets the environment variable TERM for the
          user's current terminal according to the file /etc/ttytype .
          If the terminal line is a dialup line, the user is prompted
          for the proper terminal type.

     ENVIRONMENT
          The -s option uses SHELL to determine the syntax of the
          output.

     FILES
          /etc/ttytype     terminal id to type map database
          /usr/lib/terminfoterminal capability database

     SEE ALSO
          csh(1), reset(1), sh(1), stty(1), environ(4), ttytype(4),
          termcap(4).

     BUGS
          Should be merged with stty(1).

          It could well be argued that the shell should be responsible
          for insuring that the terminal remains in a sane state; this
          would eliminate the need for this program.

     NOTES
          For compatibility with earlier versions of tset, a number of
          flags are accepted whose use is discouraged:

          -d type   equivalent to -m dialup:type

          -p type   equivalent to -m plugboard:type

          -a type   equivalent to -m arpanet:type

          -E c      Sets the erase character to c only if the terminal
                    can backspace.

          -         prints the terminal type on the standard output

          -r        prints the terminal type on the diagnostic output.

     AUTHOR



     Page 3                                        (last mod. 8/20/87)





     TSET(1)                                                   TSET(1)



          Eric Allman

     ORIGIN
          4th Berkeley Software Distribution



















































     Page 4                                        (last mod. 8/20/87)



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