ttytype.1 (2010 09)

t
ttytype(1) ttytype(1)
The following steps are performed in the order indicated when identifying a terminal:
1.
ttytype tries the Wyse 30/50/60 id request sequence.
2.
ttytype tries the standard ANSI ID request sequence. If a response is received, it is converted to
a string according to an internal table.
3.
ttytype tries the HP id request sequence.
4. If none of the above steps succeed,
ttytype prompts interactively for the correct terminal type
unless the
-a option has been given.
ttytype may skip one or more of the first three steps, depending on the presence of
-t options.
The HP ID request sequence can switch some ANSI terminals into an unexpected operating mode.
Recovery from such a condition sometimes requires cycling power on the terminal. To avoid this problem,
ttytype always sends the HP identification sequence last.
EXAMPLES
ttytype is most commonly used as part of the login sequence. The following shell script fragment can
be used during login shell initialization:
#
# If TERM is not set, see if our port is listed in /etc/ttytype.
# If /etc/ttytype doesn’t have information for our port, run
# ttytype(1) to try to determine the type of terminal we have.
#
# To have ttytype(1) prompt for the terminal type before trying
# to automatically identify the terminal, add the "-p" option
# to the "ttytype -s" command below.
#
if [ -z "$TERM" -o "$TERM" = network ]; then
unset TERM
eval ‘tset -s -Q‘
if [ -z "$TERM" -o "$TERM" = unknown ]; then
eval ‘ttytype -s‘
tset -Q -e ${ERASE:-\ˆh} $TERM
fi
fi
WARNINGS
The terminal identification sequences sent by
ttytype can cause unexpected behavior on terminals
other than the Wyse 30/50/60, standard ANSI or HP terminals. If you have such terminals in your
configuration, use the -t or -p options to prevent ttytype from sending sequences that cause unex-
pected behavior.
AUTHOR
ttytype was developed by HP.
SEE ALSO
csh(1), ksh(1), sh(1), stty(1), ttytype(4), environ(5).
2 Hewlett-Packard Company 2 HP-UX 11i Version 3: September 2010