man.bsd.lv manual page server

Manual Page Search Parameters

GETTYTAB(5) File Formats Manual GETTYTAB(5)

gettytabterminal configuration data base

gettytab

The gettytab file is a simplified version of the capfile(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.

Where to run getty(8) processes is normally defined by ttys(5).

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.) The default entry is also normally read by other programs that present login prompts to the user, such as telnetd(8), in order to retrieve the values of the he, hn, im, and if capabilities.

Refer to capfile(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.

bool false Auto-baud speed select mechanism for the Micom 600 portselector. Selection is done by looking at how the character ‘\r’ is garbled at 300, 1200, 4800, and 9600 baud.
str user to auto-login instead of prompting
bool false terminal uses any parity
str alternative end of line character (input break) (VEOL)
str alternative end of line character (input break) (VEOL2)
num unused tty control flags to write messages
num unused tty control flags to read login name
num unused tty control flags to leave terminal as
bool false use CRT erase algorithm
bool false use CRT kill algorithm
str screen clear sequence
bool false console – add ‘\r\n’ after login prompt
bool false clear screen based on terminal type in /etc/ttys
str ^Y delayed suspend character (VDSUSP)
bool false set DECCTLQ
bool false leave echo OFF
bool false terminal uses even parity
str ^? erase character (VERASE)
str ^D end of text (VEOF) character
str initial environment
num unused tty mode flags to write messages
num unused tty mode flags to read login name
num unused tty mode flags to leave terminal as
str ^O output flush character (VDISCARD)
bool false do NOT hangup line on last close
str hostname editing string
str hostname hostname
bool false terminal has real tabs
num unused tty input flags to write messages
num unused tty input flags to read login name
num unused tty input flags to leave terminal as
str display named file before prompt, like /etc/issue
bool false ignore garbage characters in login name
str initial (banner) message
str ^C interrupt character (VINTR)
num unused input speed
str ^U kill character (VKILL)
num unused tty local flags to write messages
num unused tty local flags to read login name
num unused tty local flags to leave terminal as
bool false terminal has lower case
str login: login prompt
str ^V ‘literal next’ character (VLNEXT)
str /usr/bin/login program to exec when name obtained
bool false do flow control based on carrier
bool false terminal has (or might have) a newline character
bool false do not prompt for a login name
bool false terminal uses no parity (i.e. 8-bit characters)
str default next table (for auto speed selection)
num unused tty output flags to write messages
num unused tty output flags to read login name
num unused tty output flags to leave terminal as
bool false terminal uses odd parity
num unused output speed
str \0 pad character
bool false use printer (hard copy) erase algorithm
num 0 delay between first prompt and following flush (seconds)
str unused PPP authentication program
bool false line connected to a MICOM port selector
str ^\ quit character (VQUIT)
str ^R line retype character (VREPRINT)
bool false do NOT use RAW for input, use CBREAK
num unused line speed (input and output)
str ^T status character (VSTATUS)
str ^Z suspend character (VSUSP)
str none table continuation
num 0 timeout (seconds)
str terminal type (for environment)
bool false do unbuffered output (of prompts etc)
str ^W word erase character (VWERASE)
bool false do NOT echo control chars as ‘^X
str ^S XOFF (stop output) character (VSTOP)
str ^Q XON (start output) character (VSTART)

The following capabilities are no longer supported by getty(8):

num 0 backspace delay
bool false use CRT backspace mode
num 0 carriage-return delay
num 0 form-feed (vertical motion) delay
num 0 newline (line-feed) delay
bool false terminal is known upper case only

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 will override line speed for stated direction only.

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 c0, c1, c2, i0, i1, i2, l0, l1, l2, o0, o1, or o2 numeric specifications, which can be used to specify (usually in octal, with a leading ‘0’) the exact values of the flags. These flags correspond to the termios c_cflag, c_iflag, c_lflag, and c_oflag fields, respectively. Each these sets must be completely specified to be effective. The f0, f1, and f2 are excepted for backwards compatibility with a previous incarnation of the TTY sub-system. In these flags the bottom 16 bits of the (32 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 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 (a la termcap). This delay is simulated by repeated use of the pad character pc.

The initial message im, and login message lm may include any of the following character sequences, which expand to information about the environment in which getty(8) is running.

The current date.
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 he string. A ‘@’ in the he string causes one character from the real hostname to be copied to the final hostname. A ‘#’ in the he string causes the next character of the real hostname to be skipped. Each character that is neither ‘@’ nor ‘#’ is copied into the final hostname. Surplus ‘@’ and ‘#’ characters are ignored.
The tty name.
, %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 by uname(3).
A ‘%’ character.

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(1), or having received an alarm signal, and 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 is being run, terminal driver limitations prevent a more complete implementation. getty(8) does not check parity of input characters in RAW mode.

If pp string is specified and a Point to Point Protocol (PPP) link bringup sequence is recognized, getty(8) will invoke the program referenced by the pp string, e.g. pppd(8). This can be used to handle incoming PPP calls.

login(1), gethostname(3), uname(3), capfile(5), ttys(5), getty(8), pppd(8), telnetd(8)

The gettytab file format appeared in 4.2BSD.

The special characters (erase, kill, etc.) are reset to system defaults by login(1). In cases, ‘#’ or ‘^H’ typed in a login name will be treated as an erase character, and ‘@’ will be treated as a kill character.

The delay stuff is a real crock. Apart from its general lack of flexibility, some of the delay algorithms are not implemented. The terminal driver should support sane delay settings.

The he capability is stupid.

April 5, 2012 NetBSD-9.2