gettydefs(4) — File Formats
Digital
NAME
gettydefs − terminal attributes
SYNOPSIS
/etc/gettydefs
DESCRIPTION
The gettydefs file supplies the getty program with information about various terminal attributes, such as the default initialization and a login message. The gettydefs file consists one or more single line entries. Each entry contains five fields. Fields are separated by a pound (#) sign.
When getty is invoked, it scans the gettydefs file for the first entry with a matching identifier field (see below). If a match is found, then the matching entry is parsed and the terminal attributes are set based on the flags specified in the entry. If no match is found, the first entry is used; therefore the first entry in gettydefs must be the default entry. The maximum length of each entry is 255 characters.
The format of each entry is as follows:
Identifier#Iflag#Fflag#Message#Next Identifier
IdentifierIdentifies an entry. getty takes an identifier as an argument and searches for the first entry with a matching identifier field. The identifier must be unique.
IflagSpecifies the initial terminal flags getty uses to set the terminal attributes after a line has been successfully opened. There are four categories for the terminal attributes. The input flags control the basic input attributes. The output flags control how the terminal system processes output. The control flags describe how the hardware controls the terminal. The local flags control various terminal functions. Refer to termios(4) for the description of the possible settings on a terminal port. You can specify the symbol SANE to select default settings. The default settings set the input flags to BRKINT, IGNPAR, ISTRIP, ICRNL and IXON; the output flags to OPOST and ONLCR; the control flags to CS7, PARENB, and CREAD; and the local flags to ISIG, ICANNON, IEXTEN, ECHO, ECHOK.
FflagSpecifies the final terminal flags used by getty. These flags are set after getty receives a valid login name from the standard input. The output flags and the control flags are set to the terminal attributes specified in Fflag. The input flags and local flags are appended to the initial flags specified in the Iflag field.
MessageSpecifies the login message. The login message can include the character sequence %h to obtain the host name and %t to obtain the terminal name.
Next Identifier
Specifies that if the speed specified in the current entry was incorrect, the entry corresponding to this field should be used. The getty command gets the new entry from this field and the scan process is repeated.
EXAMPLES
The following is an example of an entry in the gettydefs file containing settings for an 7 bit, even parity, 9600 baud, locally connected terminal line.
9600# B9600 SANE CLOCAL # B9600 SANE CLOCAL IXANY TAB3 #login: #9600
The following is an example of an entry in the gettydefs file containing settings for a 7 bit, even parity, 2400 baud, dial in modem line.
M2400# B2400 SANE HUPCL CLOCAL # B2400 SANE IXANY HUPCL #login: #M9600
FILES
/usr/include/sys/termios.h
/usr/sbin/getty
Specifies the command that initializes and controls terminal lines.
RELATED INFORMATION
Commands: getty(8)
Functions: kill(2)