Korean Solaris User's Guide

TTY Commands

The two commands for configuring and using the TTY environment are setterm and /bin/stty. setterm is used primarily to build the TTY stream for a particular terminal type, pushing the necessary modules onto the stream. stty changes the behavior of the modules in the stream.

setterm Command

setterm is used to configure the TTY STREAMS environment. It can inquire about and manipulate STREAMS modules for a particular TTY port. setterm allows users to tailor their TTY STREAMS environment using system-provided or user-provided STREAMS modules.

setterm uses a terminal device name that reflects the devt (device type) field in the terminfo database for configuring STREAMS modules for a TTY port. This device name is matched with an entry of the same name in the setterm configuration file, /usr/share/lib/setterm/ko/conf.file or /usr/share/lib/setterm/ko.UTF-8/conf.file. This entry contains detailed instructions on which modules to pop and push in order to properly configure the STREAMS environment.

setterm can also take the device type as a direct argument. This device type is similarly matched with an entry in /usr/share/lib/setterm/ko/conf.file or /usr/share/lib/setterm/ko.UTF-8/conf.file.

The setterm configuration file uses a special language for instructions on what actions to take. This language allows users to determine the names of modules on the STREAMS stack, to push or pop modules on the stack, and to do other operations. setterm manipulates the STREAMS stack by making ioctl calls.

/bin/stty Command

The defeucw option to the /bin/stty command is for modifying STREAMS modules to reflect changes in the user's environment. It does not work with the /usr/ucb version of stty, which has not been internationalized.

The following command queries the user's environment for information on EUC code set width and sets.

system% /bin/stty defeucw

For example, if the user has the environment variable LC_CTYPE set to locale, this option gets information on the number of bytes per character and the screen width per character for the code sets in the ko and ko.UTF-8 environments and then sends this information to relevant modules in the stream.