HP-UX Reference (11i v2 03/08) - 1 User Commands N-Z (vol 2)

s
stty(1) stty(1)
Reporting Functions
size Print terminal window size to standard output in a rows-and-columns format.
+queryGSP Print the status of the Guardian Service Processor (GSP) of the console. This
function can be used only by the superuser. This feature is available only on
specific hardware.
Control Character Default Assignments
The control characters are assigned default values when the terminal port is opened, see termio (7). The
default values used are those specified by the System V Interface Definition, Third Edition (SVID3),
except for the
werase and lnext control characters, which are set to
_POSIX_VDISABLE
to maintain
binary compatibility with previous releases of HP-UX.
The default values for the control characters may be changed by a user with root capability by using
stty and redirecting stdin to the device /dev/ttyconf
. Any of the four command forms specified in
the Description section above may be used. However, only the control character defaults will be reported
or altered. It will have no effect on the defaults for any of the other modes.
Note that these defaults will be used for all terminal ports in the system, except the system console, and
the changes will not become effective for a particular port until it is (re)opened. The default control char-
acter assignment will not work with the system console because the system console is never closed while
the system is running, and therefore cannot be reopened.
Care should be exercised when re-assigning the control character defaults. Control character values
should be tested with applications before assigning them as a default value.
EXTERNAL INFLUENCES
Environment Variables
LC_CTYPE determines the valid control characters for printing.
If
LC_CTYPE is not specified in the environment or is set to the empty string, the value of LANG is used as
a default for each unspecified or empty variable. If LANG is not specified or is set to the empty string, a
default of "C" (see lang(5)) is used instead of LANG. If any internationalization variable contains an
invalid setting, stty behaves as if all internationalization variables are set to "C". See environ(5).
International Code Set Support
Single-byte character code sets are supported.
EXAMPLES
The command:
stty kill ’ˆX’ intr ’ˆC’
sets the delete-line character to ˆX (Ctrl-X) and the interrupt character to ˆC. This command is usually
found in the .login or .profile file so that ˆX and ˆC need not be set by the user at each login
session.
The command:
stty kill ’ˆX’ intr ’ˆC’ werase ’ˆW’ </dev/ttyconf
sets the default values for the delete-line character to ˆX (Ctrl-X), the interrupt character to ˆC, and the
word erase character to ˆW. Any terminal port opened after this command is issued will see these new
default values for the kill, intr, and werase control characters.
WARNINGS
Use of
raw mode produces certain side effects which have varied from release to release in the past and
may vary in the future. Relying on these side effects in applications can lead to unreliable results in the
future and is therefore discouraged.
DEPENDENCIES
Refer to the DEPENDENCIES section of termio(7) for a further description of capabilities that are not
supported.
SEE ALSO
shl(1), tabs(1), ioctl(2), termio(7), termiox(7).
HP-UX 11i Version 2: August 2003 4 Hewlett-Packard Company Section 1853