Next | Prev | Up | Top | Contents | Index

Managing the TTY Subsystem

This section covers the following topics:

Checking Line Settings Using IRIX Shell Commands

The /etc/gettydefs file contains information used by the getty command to establish the speed and terminal settings for a line. The general format of the gettydefs file is

label# initial-flags # final-flags #login-prompt #next-label

The following example shows a few lines from a gettydefs file:

co_9600# B9600 CLOCAL # B9600 SANE TAB3 CLOCAL #\r\n\n$HOSTNAME login: #co_4800
co_4800# B4800 CLOCAL # B4800 SANE TAB3 CLOCAL #\r\n\n$HOSTNAME login: #co_2400
co_2400# B2400 CLOCAL # B2400 SANE TAB3 CLOCAL #\r\n\n$HOSTNAME login: #co_1200
co_1200# B1200 CLOCAL # B1200 SANE TAB3 CLOCAL #\r\n\n$HOSTNAME login: #co_300
co_300# B300 CLOCAL # B300 SANE TAB3 CLOCAL #\r\n\n$HOSTNAME login: #co_9600
dx_115200# B115200 # B115200 SANE TAB3 HUPCL #\r\n\n$HOSTNAME login: #dx_115200
dx_57600# B57600 # B57600 SANE TAB3 HUPCL #\r\n\n$HOSTNAME login: #dx_57600
dx_38400# B38400 # B38400 SANE TAB3 HUPCL #\r\n\n$HOSTNAME login: #dx_38400
dx_19200# B19200 # B19200 SANE TAB3 HUPCL #\r\n\n$HOSTNAME login: #dx_19200
dx_9600# B9600 # B9600 SANE TAB3 HUPCL #\r\n\n$HOSTNAME login: #dx_9600

The entries beginning with dx are typically used for terminals or modems; those beginning with du are typically used for low-speed modems. See gettydefs(4) for more information on the fields of each entry.

These entries form a single rotary hunt sequence; the last field on each line is the label of the next line. The next label field for the last line shown points back to the first line in the sequence. The object of the hunt sequence is to link a range of line speeds. If you see garbage characters instead of a clear login prompt, press the <Esc> key to force getty to step to the next entry in the sequence. The hunt continues until the baud rate of the line matches the speed of the user's terminal.

The flag fields shown have the following meanings:

B300-B115200

The baud rate of the line. Note that not all systems support rates greater than 38,400. Refer to your Owner's Guide to find the maximum supported baud rate for your system.

HUPCL

Hang up on close.

SANE

A composite flag that stands for a set of normal line characteristics.

IXANY

Allow any character to restart output. If this flag is not specified, only DC1 <Ctrl-Q> restarts output.

TAB3

Send tabs to the terminal as spaces.

For a description of all getty flags, see termio(7).

Creating and Testing Line Settings

Create new entries for the gettydefs file by following the example shown in "Checking Line Settings Using IRIX Shell Commands." Each entry in the file is followed by a blank line. After editing the file, run the command

/etc/getty -c /etc/gettydefs 

This causes getty to scan the file and print the results on your terminal. Any unrecognized modes or improperly constructed entries are reported.

Modifying Line Characteristics

You can modify TTY line characteristics using an IRIX editor, such as vi, to edit /etc/inittab.

The /etc/inittab file contains configuration instructions for the /etc/init command. The general format of a line entry in the /etc/inittab file is as follows:

identification:level:action:process

The four colon-separated fields are as follows:

identification

A unique one- or two-character identifier for the line entry.

level

The run-level(s) in which the entry is to be performed.

action

How /etc/init treats the process field (refer to the inittab(4) reference page for complete information).

process

The shell command to be executed.

/etc/inittab contains several entries that spawn getty processes. The following example is a selection of such entries from a sample /etc/inittab:

t1:23:respawn:/etc/getty -s console ttyd1 co_9600 
t2:23:respawn:/etc/getty ttyd2 co_9600 

There are at least three things you might want to do to an inittab entry for a TTY line:


Checking Line Settings Using IRIX Shell Commands
Creating and Testing Line Settings
Modifying Line Characteristics

Next | Prev | Up | Top | Contents | Index