Manual Reference Pages - MGETTYDEFS (4)
mgettydefs - speed and terminal settings used by mgetty
/etc/gettydefs file contains information used by
to set up the speed and terminal settings for a line.
It also supplies information on what the
login prompt should look like.
Many versions of UNIX have a version
that also reads
getty expect similar formats in
/etc/gettydefs except that, when used by
mgetty, extended functionality is available.
Even so, the additional functions are simply ignored by
getty, so they can co-exist using the same file.
Note, however, that
mgetty can be compiled to use a file different from
/etc/gettydefs if your
getty gets upset about the extensions.
This manual page documents
/etc/gettydefs and describes the extended functionality available when used by
This document will refer to
mgettys behaviour is different.
Each entry in
/etc/gettydefs has the following format:
Each entry is followed by a blank line.
The login prompt field can contain quoted characters which
will be converted to other values.
The sequences and their substitutions are:
label# initial-flags # final-flags # login-prompt #next-label
Several additional composite settings are available for
final-flags. The following composite flags are supported by
mgetty and are usually supported by
vertical tab (VT)
number of users currently logged in
number of users currently logged in
date in DD/MM format
time in hh:mm:ss format
modem CONNECT attributes
where "sequence" is a valid strtol format, such as:
Note that standard
getty usually only supports \b, \r and \n.
The various fields are:
This is the string against which
getty tries to match its second argument.
It is often the speed, such as
1200, at which the terminal is supposed to run, but it need not be (see below).
These flags are the initial
settings to which the terminal is to be set if
a terminal type is not specified to
getty. The flags that
getty understands are the ones listed in
mgetty is usually compiled for
and often has a more complete set than
Normally only the speed flag is required in the
getty automatically sets the terminal to raw input mode and
takes care of the other flags.
If the "-s" option is used with
the speed setting is ignored.
initial-flag settings remain in effect until
These flags take the same values as the
initial-flags and are set just before
login. The speed flag is again required, except with
mgetty if the -s flag was supplied.
Two other commonly specified
TAB3, so that tabs are sent to the terminal as spaces, and
HUPCL, so that the line is hung up on the final close.
This entire field is printed as the
login-prompt. Unlike the above fields where white space
(a space, tab or new-line)
they are included in the
This field is ignored if the "-p" option has been
specifies the label to use if the user
user types a
getty detects a reception error.
Getty searches for the entry with
next-label as its
label field and set up the terminal for those settings.
Usually, a series of speeds are linked together in this fashion,
into a closed set; for instance,
2400 linked to
1200, which in turn is linked to
300, which finally is linked to
next-label is ignored with
mgetty (but not
getty) can set any of the control characters listed in the
structure by the use of two tokens:
equivalent to stty sane.
(BRKINT, IGNPAR, ISTRIP, ICRNL, IXON, OPOST, CS8, CREAD, ISIG, ICANON,
(CS7, PARENB, PARODD)
(resets PARENB, PARODD, and sets CS8)
raw I/O (no canonical processing)
(turns off OPOST, ICANON)
enable canonical processing
(turns on OPOST, ICANON)
Respect newlines (turns INLCR, IGNCR, ICRNL, ONLCR, OCRNL, ONLRET
Ignore case - treat all as lowercase.
(IUCLC, OLCUC, XCASE)
Is set if mgetty believes login is entirely uppercase.
(turns off IUCLC, OLCUC and XCASE)
output tabs as tabs
output tabs as spaces
Sets VERASE to "#" and VKILL to CKILL respectively.
(note that while many gettys default VERASE to "#".
mgetty defaults VERASE to backspace.)
<character name> <value>
The value can be set as ^<character>, \nnn or
\<character> (normal UNIX \ escapes).
manual pages to a list of which V variables can be changed.
Note that many of these can be changed in the c_cc array, but wont
have any effect.
getty is called without a second argument, the first entry of
/etc/gettydefs is used by
getty, thus making the first entry of
/etc/gettydefs the default entry.
It is also used if
getty cannot find the specified
Mgetty use a default label of n, but this can be changed in the
/etc/gettydefs itself is missing, there is one entry built into
the command which brings up a terminal at
300 (configuration parameter in
It is strongly recommended that after making or modifying
/etc/gettydefs, it be run through
getty with the check option to be sure there are no errors.
The following two lines show an example of 300/1200 baud toggle, which is
useful for dial-up ports:
1200# B1200 HUPCL # B1200 SANE IXANY TAB3 #login: #300
300# B300 HUPCL # B300 SANE IXANY TAB3 #login: #1200
The following line shows a typical 9600 baud entry for a hard-wired connection
(not currently supported for
9600# B9600 # B9600 SANE IXANY IXANY ECHOE TAB3 #login: #9600
The following line is a typical smart-modem setup, suitable
B19200 SANE VERASE \b VINTR \003 HUPCL #
\n\D \T \N Users @!login: #19200mg
|greenie ||MGETTYDEFS (4) ||4 Dec 93 |
Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.