GETTYTAB(5)

NAME
gettytab - terminal configuration data base

SYNOPSIS
/etc/gettytab

DESCRIPTION

gettytab is a simplified version of the termcap(5) data base used to describe terminal lines. The initial terminal login process getty(8) accesses the gettytab file each time it starts, allowing simpler reconfiguration of terminal characteristics. Each entry in the data base is used to describe one class of terminals.

There is a default terminal class, default, that is used to set global defaults for all other classes. That is, the default entry is read, then the entry for the class required is used to override particular settings.

CAPABILITIES

Refer to termcap(5) for a description of the file layout. The Default column below lists defaults obtained if there is no entry in the table obtained, nor one in the special default table.

Name | Type | Default | Description
ab | bool | false | read a \r first and guess the
 |  |  | baud rate from it
ap | bool | false | terminal uses 7 bits,
 |  |  | any parity
bd | num | 0 | backspace delay
bk | str | 0377 | alternate end of line
 |  |  | character (input break)
cb | bool | false | use crt backspace mode
cd | num | 0 | carriage-return delay
ce | bool | false | use crt erase algorithm
ck | bool | false | use crt kill algorithm
cl | str | NULL | screen clear sequence
co | bool | false | console - add NEWLINE after
 |  |  | login prompt
de | num | 0 | delay before first prompt is
 |  |  | printed (seconds)
ds | str | ^Y | delayed suspend character
dx | bool | false | set DECCTLQ
ec | bool | false | leave echo OFF
ep | bool | false | terminal uses 7 bits, even
 |  |  | parity
er | str | ^? | erase character
et | str | ^D | end of text (EOF) character
ev | str | NULL | initial environment
f0 | num | unused | tty mode flags to write
 |  |  | messages
f1 | num | unused | tty mode flags to read login
 |  |  | name
f2 | num | unused | tty mode flags to leave
 |  |  | terminal as
fd | num | 0 | form-feed (vertical motion)
 |  |  | delay
fl | str | ^O | output flush character
hc | bool | false | do NOT hangup line on
 |  |  | last close
he | str | NULL | hostname editing string
hn | str | hostname | hostname
ht | bool | false | terminal has real tabs
ig | bool | false | ignore garbage characters
 |  |  | in login name
im | str | NULL | initial (banner) message
in | str | ^C | interrupt character
is | num | unused | input speed
kl | str | ^U | kill character
lc | bool | false | terminal has lower case
lm | str | login: | login prompt
ln | str | ^V | “literal next” character
lo | str | /usr/bin/login | program to exec when name
 |  |  | obtained
ms | str | NULL | list of terminal modes
 |  |  | to set or clear
m0 | str | NULL | set modes that apply at the same
 |  |  | time as those set by f0
m1 | str | NULL | set modes that apply at the same
 |  |  | time as those set by f1
m2 | str | NULL | set modes that apply at the same
 |  |  | time as those set by f2
nd | num | 0 | NEWLINE (LINEFEED) delay
nl | bool | false | terminal has (or might have)
 |  |  | a NEWLINE character
nx | str | default | next table (for auto speed
 |  |  | selection)
op | bool | false | terminal uses 7 bits,
 |  |  | odd parity
os | num | unused | output speed
p8 | bool | false | terminal uses 8 bits, no
 |  |  | parity
pc | str | \0 | pad character
pe | bool | false | use printer (hard copy) erase
 |  |  | algorithm
pf | num | 0 | delay between first prompt
 |  |  | and following flush (seconds)
ps | bool | false | line connected to a MICOM
 |  |  | port selector
qu | str | ^\ | quit character
rp | str | ^R | line retype character
rw | bool | false | do NOT use RAW for input,
 |  |  | use CBREAK
sp | num | 0 | line speed (input and output)
su | str | ^Z | suspend character
tc | str | none | table continuation
td | num | 0 | tab delay
to | num | 0 | timeout (seconds)
tt | str | NULL | terminal type (for environment)
ub | bool | false | do unbuffered output (of
 |  |  | prompts etc)
uc | bool | false | terminal is known upper case only
we | str | ^W | word erase character
xc | bool | false | do NOT echo control chars as ^X
xf | str | ^S | XOFF (stop output) character
xn | str | ^Q | XON (start output) character

If no line speed is specified, speed will not be altered from that which prevails when getty is entered. Specifying an input or output speed overrides line speed for stated direction only. If ab is specified, getty will initially read a character from the tty, assumed to be a carriage return, and will attempt to figure out the baud rate based on what the character appears as. It will then look for a table entry for that baud rate; if the line appears to be a 300 baud line, it will look for an entry 300-baud, if it appears to be a 1200 baud line, it will look for an entry 1200-baud, etc..

Terminal modes to be used for the output of the message, for input of the login name, and to leave the terminal set as upon completion, are derived from the Boolean flags specified. If the derivation should prove inadequate, any (or all) of these three may be overridden with one of the f0, f1, or f2 numeric specifications, which can be used to specify (usually in octal, with a leading `0') the exact values of the flags. Local (new tty) flags are set in the top 16 bits of this (32 bit) value.

The ms field can be used to specify modes to be set and cleared. These modes are specified as stty(1V) modes; any mode supported by stty may be specified, except for the baud rate which must be specified with the br field. This permits modes not supported by the older terminal interface described in ttcompat(4M) to be set or cleared. Thus, to set the terminal port to which the printer is attached to even parity, TAB expansion, no NEWLINE to RETURN/LINEFEED translation, and RTS/CTS flow control enabled, do:
    :ms=evenp,-tabs,nl,crtscts:

The m0, m1, and m2 fields can be used to set modes which only apply concurrently with those set by f0, f1, and f2, respectively. The modes specified by ms, m0, m1, and m2 are applied after the modes specified by other existing capabilities.

Should getty receive a null character (presumed to indicate a line break) it will restart using the table indicated by the nx entry. If there is none, it will re-use its original table.

Delays are specified in milliseconds, the nearest possible delay available in the tty driver will be used. Should greater certainty be desired, delays with values 0, 1, 2, and 3 are interpreted as choosing that particular delay algorithm from the driver.

The cl screen clear string may be preceded by a (decimal) number of milliseconds of delay required (as with termcap(5)). This delay is simulated by repeated use of the pad character pc.

The initial message, and login message, im and lm may include the character sequence %h or %t to obtain the hostname or tty name respectively. (%% obtains a single `%' character.) The hostname is normally obtained from the system, but may be set by the hn table entry. In either case it may be edited with he. The he string is a sequence of characters, each character that is neither `@' nor `#' is copied into the final hostname. A `@' in the he string, copies one character from the real hostname to the final hostname. A `#' in the he string, skips the next character of the real hostname. Surplus `@' and `#' characters are ignored.

When getty execs the login process, given in the lo string (usually /usr/bin/login), it will have set the environment to include the terminal type, as indicated by the tt string (if it exists). The ev string, can be used to enter additional data into the environment. It is a list of comma separated strings, each of which will presumably be of the form name=value.

If a non-zero timeout is specified, with to, then getty will exit within the indicated number of seconds, either having received a login name and passed control to login, or having received an alarm signal, and exited. This may be useful to hangup dial in lines.

Output from getty is even parity unless op or p8 is specified. op may be specified with ap to allow any parity on input, but generate odd parity output. Note: this only applies while getty is being run, terminal driver limitations prevent a more complete implementation. getty does not check parity of input characters in RAW mode.

FILES
/etc/gettytab

SEE ALSO
termcap(5), getty(8)