gettytab - terminal configuration database
The gettytab file is a simplified version of the termcap(5)
to describe terminal lines. The initial terminal login process getty(8)
accesses the gettytab file each time it starts, allowing
of terminal characteristics. Each entry in the
used to describe one class of terminals.
There is a default terminal class, default, that is used to
defaults for all other classes. (That is, the default entry
then the entry for the class required is used to override
Refer to termcap(5) for a description of the file layout.
column below lists defaults obtained if there is no entry in
obtained, nor one in the special default table.
Name Type Default Description
ap bool false Terminal uses any parity.
bk str 0377 Alternative end-of-line character (input
c0 num unused TTY control flags to write
c1 num unused TTY control flags to read login name.
c2 num unused TTY control flags to leave
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 `0 after login
ds str `^Y' Delayed suspend character.
dx bool false Set DECCTLQ.
ec bool false Leave echo OFF.
ep bool false Terminal uses 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
f2 num unused TTY mode flags to leave terminal as.
fl str `^O' Output flush character.
hc bool false Do not hangup line on last
he str NULL Hostname editing string.
hn str hostname Hostname.
ht bool false Terminal has real tabs.
i0 num unused TTY input flags to write messages.
i1 num unused TTY input flags to read login
i2 num unused TTY input flags to leave terminal as.
ig bool false Ignore garbage characters in
im str NULL Initial (banner) message.
in str `^C' Interrupt character.
is num unused Input speed.
kl str `^U' Kill character.
l0 num unused TTY local flags to write messages.
l1 num unused TTY local flags to read login
l2 num unused TTY local flags to leave terminal as.
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 execute when
mb bool false Do flow control based on carrier.
nl bool false Terminal has (or might have) a
np bool false Terminal uses no parity (i.e.,
nx str default Next table (for auto speed selection).
o0 num unused TTY output flags to write messages.
o1 num unused TTY output flags to read login
o2 num unused TTY output flags to leave terminal as.
op bool false Terminal uses odd parity.
os num unused Output speed.
pc str ` ' Pad character.
pe bool false Use printer (hard copy) erase
pf num 0 Delay between first prompt and
pp str unused PPP authentication program.
ps bool false Line connected to a MICOM port
qu str `^' Quit character.
rp str `^R' Line retype character.
rw bool false Do not use raw for input, use
sp num unused Line speed (input and output).
su str `^Z' Suspend character.
tc str none Table continuation.
to num 0 Timeout (seconds).
tt str NULL Terminal type (for environment).
ub bool false Do unbuffered output (of
we str `^W' Word erase character.
xc bool false Do not echo control characters
xf str `^S' XOFF (stop output) character.
xn str `^Q' XON (start output) character.
The following capabilities are no longer supported by getty(8):
bd num 0 Backspace delay.
cb bool false Use CRT backspace mode.
cd num 0 Carriage-return delay.
fd num 0 Form-feed (vertical motion)
nd num 0 Newline (line-feed) delay.
uc bool false Terminal is known upper case
If no line speed is specified, speed will not be altered
from that which
prevails when getty(8) is entered. Specifying an input or
will override line speed for stated direction only.
Terminal modes to be used for the output of the message and
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
inadequate, any (or all) of these three may be overridden
with one of the
c0, c1, c2, i0, i1, i2, l0, l1, l2, o0, o1, or o2 numeric
which can be used to specify (usually in octal, with a leading `0') the
exact values of the flags. These flags correspond to the
c_cflag, c_iflag, c_lflag, and c_oflag fields, respectively.
these sets must be completely specified to be effective.
The f0, f1, and
f2 are excepted for backwards compatibility with a previous
of the TTY sub-system. In these flags the bottom 16 bits of
bits) value contain the sgttyb sg_flags field, while the top
16 bits represent
the local mode word.
Should getty(8) receive a null character (presumed to indicate a line
break) it will restart using the table indicated by the nx
there is none, it will re-use its original table.
Delays are specified in milliseconds; the nearest possible
in the TTY driver will be used. Should greater certainty be desired,
delays with values 0, 1, 2, and 3 are interpreted as
particular delay algorithm from the driver.
The cl screen clear string may be preceded by a (decimal)
number of milliseconds
of delay required (a la termcap(5)). This delay
by repeated use of the pad character pc.
The initial message and login message (im and lm) may include any of the
following character sequences, which expand to information
about the environment
in which getty(8) is running:
%d The current date.
%h The hostname of the machine, which is normally obtained from the
system using gethostname(3), but may also be overridden by the hn
table entry. In either case it may be edited with the
A `@' in the he string causes one character from the
to be copied to the final hostname. A `#' in the he
the next character of the real hostname to be skipped.
that is neither `@' nor `#' is copied into the
Surplus `@' and `#' characters are ignored.
%t The TTY name.
%m, %r, %s, %v
The type of machine, release of the operating system,
name of the
operating system, and version of the kernel, respectively, as returned
%% A `%' character.
When getty(8) executes the login process given in the lo
/usr/bin/login), it will have set the environment to include
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
If a non-zero timeout is specified with to, then getty(8)
will exit within
the indicated number of seconds, either having received a
and passed control to login(1), or having received an alarm
exited. This may be useful to hangup dial in lines.
Output from getty(8) is even parity unless op or np is specified. The op
string may be specified with ap to allow any parity on input, but generate
odd parity output. Note: this only applies while getty(8) is being
run; terminal driver limitations prevent a more complete implementation.
getty(8) does not check parity of input characters in RAW
If a pp string is specified and a PPP link bring-up sequence
getty(8) will invoke the program referenced by the pp
This can be used to handle incoming PPP calls.
login(1), gethostname(3), uname(3), termcap(5), getty(8)
The gettytab file format appeared in 4.2BSD.
The special characters (erase, kill, etc.) are reset to system defaults
by login(1). In all cases, `#' or `^H' typed in a login
name will be
treated as an erase character, and `@' will be treated as a
The delay stuff is a real crock. Apart from its general
lack of flexibility,
some of the delay algorithms are not implemented.
driver should support sane delay settings.
The he capability is stupid.
The termcap(5) format is horrid; something more rational
should have been
OpenBSD 3.6 April 19, 1994
[ Back ]