Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ tset(C) — OpenDesktop 1.0.0y

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

stty(C)

termio(M)

tput(C)

tty(M)

terminfo(F)


     TSET(C)                              UNIX System V



     Name
          tset - provide information to set terminal modes


     Syntax
          tset [ options ] [ type ]


     Description
          tset allows the user to set  a  terminal's  ERASE  and  KILL
          characters,  and define the terminal's type and capabilities
          by creating values for the TERM environment variable.   tset
          initializes  or resets the terminal with tput(C).  If a type
          is given with the -s option, tset creates information for  a
          terminal  of  the  specified type.  The type may be any type
          given  in  the  terminfo  database.   If  the  type  is  not
          specified with the -s option, tset creates information for a
          terminal of the type defined by the value of the environment
          variable, TERM, unless the -h or -m option is given.  If the
          TERM variable is defined, tset uses  the  terminfo  database
          entry.   If  these  options  are  used,  tset  searches  the
          /etc/ttytype file for the terminal type corresponding to the
          current  serial  port;  it  then  creates  information for a
          terminal based on this type.  If  the  serial  port  is  not
          found in /etc/ttytype, the terminal type is set to unknown.

          tset  displays  the  created  information  at  the  standard
          output.   The  information  is in a form that can be used to
          set the  current  environment  variables.   The  exact  form
          depends on the login shell from which tset was invoked.  The
          following examples illustrate how to use this information to
          change the variables.

          There are the following options:

          -e[c]
               Sets the ERASE character to c on  all  terminals.   The
               default setting is the BACKSPACE, or CTRL-H.

          -E[c]
               Identical  to  the  -e  command  except  that  it  only
               operates on terminals that can BACKSPACE.

          -k[c]
               Sets the KILL character to c, defaulting to CTRL-U.

          -    Prints the terminal type on the standard output.

          -s   Outputs  the  ``setenv''  commands  [for  csh(C)],   or
               ``export''  and  assignment  commands [for sh(1)].  The
               type of commands are determined  by  the  user's  login
               shell.

          -h   Forces tset to search /etc/ttytype for information  and
               to overlook the environment variable, TERM.

          -S   Only  outputs  the  strings  to  be   placed   in   the
               environment   variables,  without  the  shell  commands
               printed for -S.

          -r   Prints the terminal type on the diagnostic output.

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

          -I   Suppresses  printing  of  the  terminal  initialization
               strings, e.g., spawns tput reset instead of tput init.

          -m[ident][test baudrate]:type
               Allows a user to specify how a given serial port is  is
               to  be  mapped  to an actual terminal type.  The option
               applies to any serial port in /etc/ttytype  whose  type
               is  indeterminate (e.g., dialup, plugboard, etc.).  The
               type specifies the terminal type to be used, and  ident
               identifies  the  name  of  the indeterminate type to be
               matched.  If no ident is given, all indeterminate types
               are  matched.   The  test baudrate defines a test to be
               performed  on  the  serial  port  before  the  type  is
               assigned.   The baudrate must be as defined in stty(C).
               The test may be any combination of:  >, =, <, @, and !.
               If  the  type  begins with a question mark, the user is
               asked if 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
               must  be  escaped  to prevent filename expansion by the
               shell.  If more than one -m option is given, the  first
               correct mapping prevails.

          tset is most useful when included in the .login [for csh(C)]
          or  .profile  [for  sh(C)]  file  executed  automatically at
          login, with -m mapping used to specify the terminal type you
          most frequently dial in on.


     Examples
          tset gt42

          tset -mdialup\>300:adm3a -mdialup:dw2 -Qr -e#

          tset -m dial:ti733 -m plug:\?hp2621 -m unknown:\? -e -k^U

          To use the information created by  the  -s  option  for  the
          Bourne shell, (sh), repeat these commands:

               tset -s ... > /tmp/tset$$
               /tmp/tset$$
               rm /tmp/tset$$

          To use the information created for csh, use:
          set noglob
          set term=(`tset -S ....`)
          setenv TERM $term[1]
          unset term
          unset noglob


     Files
          /etc/ttytype        Port name to terminal type map database
          /usr/lib/terminfo/* Terminal capability database


     See Also
          stty(C), termio(M), tput(C), tty(M), terminfo(F)


     Credit
          This utility was developed at the University  of  California
          at Berkeley and is used with permission.


     (printed 9/27/89)                                    TSET(C)

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