ttytype.1 (2010 09)

t
ttytype(1) ttytype(1)
NAME
ttytype - terminal identification program
SYNOPSIS
ttytype [-apsv][-t
type ]
DESCRIPTION
ttytype automatically identifies the current terminal type by sending an identification request
sequence to the terminal. This method works for local, modem, and remote terminal connections, as well
as for the hpterm and xterm terminal emulators.
Once the terminal has been identified,
ttytype prints the terminal’s type to the standard output (see
terminfo (4)). This string is usually used as the value for the
TERM environment variable.
If
ttytype is unable to determine the correct terminal type, it prompts the user for the correct terminal
identification string.
Options
ttytype recognizes the following options:
-a Causes ttytype to return an ID of "unknown" instead of prompting for the terminal
type if auto-identification fails. If this option is not present, ttytype interactively
prompts the user for the terminal type if it is unable to determine the correct type
automatically.
-p Causes ttytype to prompt for the terminal type before it sends the terminal
identification request sequence. If the user responds with only a carriage return,
ttytype proceeds with the automatic terminal identification process. Any other
response is taken as the correct terminal type. Note that the LINES and COLUMNS vari-
ables are not set if the user manually enters a terminal type.
The
-p option is normally used only for terminals that do not behave well when
presented with ttytype’s terminal identification request sequence. It gives the user a
chance to respond with the correct terminal type before any escape sequences are sent
that could have an adverse effect on the terminal.
The
-a option can be used in conjunction with the -p option. The -a
option only inhi-
bits interactive prompting after
ttytype has failed to identify the terminal by other
means.
-s Tells ttytype to print a series of shell commands to set the
TERM, LINES, and
COLUMNS environment variables to appropriate values. In addition, the variable ERASE
is set to the two-character sequence representing the appropriate erase character for the
terminal (DEL for ANSI terminals, backspace for all others). This two-character
sequence can then be used as an argument to stty or tset (see stty (1) and tset (1)).
The
SHELL environment variable is consulted to see which shell syntax to use for setting
the environment variables. This output is normally used with a command of the form:
eval ‘ttytype -s‘
-t type ttytype normally attempts identification of Wyse, ANSI and HP terminals. The -t
type argument can be used to restrict the inquiry to that required for terminals of the
specified type. The accepted types are ansi, hp, and wyse. Multiple -t options can be
specified.
-v Enable verbose messages to standard error.
On terminals where the response is slow, two additional options are provided:
-Rxxx Causes ttytype to wait up to xxx milliseconds to get the response from the terminal.
-Cyyy Causes ttytype to wait up to yyy milliseconds between two successive attempts to read
the response from the terminal.
Notes
Use of the
-s option is highly recommended because many terminals support variable-size displays.
This option provides the only means for automatically configuring the user environment in such a manner
that applications can handle these terminals correctly. Note that LINES and COLUMNS are not set if the
-p option is used and the user manually enters a terminal type.
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (2 pages)