HP-UX Reference (11i v2 07/12) - 1 User Commands N-Z (vol 2)
t
ttytype(1) ttytype(1)
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 unexpected behavior.
AUTHOR
ttytype was developed by HP.
SEE ALSO
csh(1), ksh(1), sh(1), stty(1), ttytype(4), environ(5).
HP-UX 11i Version 2: December 2007 Update − 2 − Hewlett-Packard Company 375