1.\" Copyright (c) 1983, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" %sccs.include.redist.roff% 5.\" 6.\" @(#)gettytab.5 8.5 (Berkeley) 06/01/94 7.\" 8.Dd 9.Dt GETTYTAB 5 10.Os BSD 4.2 11.Sh NAME 12.Nm gettytab 13.Nd terminal configuration data base 14.Sh SYNOPSIS 15.Nm gettytab 16.Sh DESCRIPTION 17The 18.Nm gettytab 19file 20is a simplified version of the 21.Xr termcap 5 22data base 23used to describe terminal lines. 24The initial terminal login process 25.Xr getty 8 26accesses the 27.Nm gettytab 28file each time it starts, allowing simpler 29reconfiguration of terminal characteristics. 30Each entry in the data base 31is used to describe one class of terminals. 32.Pp 33There is a default terminal class, 34.Em default , 35that is used to set global defaults for all other classes. 36(That is, the 37.Em default 38entry is read, then the entry for the class required 39is used to override particular settings.) 40.Sh CAPABILITIES 41Refer to 42.Xr termcap 5 43for a description of the file layout. 44The 45.Em default 46column below lists defaults obtained if there is 47no entry in the table obtained, nor one in the special 48.Em default 49table. 50.Bl -column Namexx /usr/bin/login Default 51.It Sy Name Type Default Description 52.It "ap bool false terminal uses any parity" 53.It "bd num 0 backspace delay" 54.It "bk str 0377 alternate end of line character (input break)" 55.It "cb bool false use crt backspace mode" 56.It "cd num 0 carriage-return delay" 57.It "ce bool false use crt erase algorithm" 58.It "ck bool false use crt kill algorithm" 59.It "cl str" Ta Dv NULL Ta 60.No "screen clear sequence" 61.It "co bool false console - add" 62.Ql \en 63after login prompt 64.It "ds str" Ta So Li ^Y Sc Ta 65.No "delayed suspend character" 66.It "dx bool false set" 67.Dv DECCTLQ 68.It "ec bool false leave echo" 69.Tn OFF 70.It "ep bool false terminal uses even parity" 71.It "er str" Ta So Li ^? Sc Ta 72.No "erase character" 73.It "et str" Ta So Li ^D Sc Ta 74.No "end of text" 75.Pq Dv EOF 76character 77.It "ev str" Ta Dv NULL Ta 78.No "initial environment" 79.It "f0 num unused tty mode flags to write messages" 80.It "f1 num unused tty mode flags to read login name" 81.It "f2 num unused tty mode flags to leave terminal as" 82.It "fd num 0 form-feed (vertical motion) delay" 83.It "fl str" Ta So Li ^O Sc Ta 84.No "output flush character" 85.It "hc bool false do" 86.Tn NOT 87hangup line on last close 88.It "he str" Ta Dv NULL Ta 89.No "hostname editing string" 90.It "hn str hostname hostname" 91.It "ht bool false terminal has real tabs" 92.It "ig bool false ignore garbage characters in login name" 93.It "im str" Ta Dv NULL Ta 94.No "initial (banner) message" 95.It "in str" Ta So Li ^C Sc Ta 96.No "interrupt character" 97.It "is num unused input speed" 98.It "kl str" Ta So Li ^U Sc Ta 99.No "kill character" 100.It "lc bool false terminal has lower case" 101.It "lm str login: login prompt" 102.It "ln str" Ta So Li ^V Sc Ta 103.No "``literal next'' character" 104.It "lo str" Ta Pa /usr/bin/login Ta 105.No "program to exec when name obtained" 106.It "nd num 0 newline (line-feed) delay" 107.It "nl bool false terminal has (or might have) a newline character" 108.It "np bool false terminal uses no parity (i.e. 8-bit characters)" 109.It "nx str default next table (for auto speed selection)" 110.It "op bool false terminal uses odd parity" 111.It "os num unused output speed" 112.It "pc str" Ta So Li \e0 Sc Ta 113.No "pad character" 114.It "pe bool false use printer (hard copy) erase algorithm" 115.It "pf num 0 delay" 116between first prompt and following flush (seconds) 117.It "ps bool false line connected to a" 118.Tn MICOM 119port selector 120.It "qu str" Ta So Li \&^\e Sc Ta 121.No "quit character" 122.It "rp str" Ta So Li ^R Sc Ta 123.No "line retype character" 124.It "rw bool false do" 125.Tn NOT 126use raw for input, use cbreak 127.It "sp num unused line speed (input and output)" 128.It "su str" Ta So Li ^Z Sc Ta 129.No "suspend character" 130.It "tc str none table continuation" 131.It "to num 0 timeout (seconds)" 132.It "tt str" Ta Dv NULL Ta 133.No "terminal type (for environment)" 134.It "ub bool false do unbuffered output (of prompts etc)" 135.It "uc bool false terminal is known upper case only" 136.It "we str" Ta So Li ^W Sc Ta 137.No "word erase character" 138.It "xc bool false do 139.Tn NOT 140echo control chars as 141.Ql ^X 142.It "xf str" Ta So Li ^S Sc Ta Dv XOFF 143(stop output) character 144.It "xn str" Ta So Li ^Q Sc Ta Dv XON 145(start output) character 146.El 147.Pp 148If no line speed is specified, speed will not be altered 149from that which prevails when getty is entered. 150Specifying an input or output speed will override 151line speed for stated direction only. 152.Pp 153Terminal modes to be used for the output of the message, 154for input of the login name, 155and to leave the terminal set as upon completion, 156are derived from the boolean flags specified. 157If the derivation should prove inadequate, 158any (or all) of these three may be overridden 159with one of the 160.Em \&f0 , 161.Em \&f1 , 162or 163.Em \&f2 164numeric specifications, which can be used to specify 165(usually in octal, with a leading '0') 166the exact values of the flags. 167Local (new tty) flags are set in the top 16 bits 168of this (32 bit) value. 169.Pp 170Should 171.Xr getty 172receive a null character 173(presumed to indicate a line break) 174it will restart using the table indicated by the 175.Em nx 176entry. If there is none, it will re-use its original table. 177.Pp 178Delays are specified in milliseconds, the nearest possible 179delay available in the tty driver will be used. 180Should greater certainty be desired, delays 181with values 0, 1, 2, and 3 are interpreted as 182choosing that particular delay algorithm from the driver. 183.Pp 184The 185.Em \&cl 186screen clear string may be preceded by a (decimal) number 187of milliseconds of delay required (a la termcap). 188This delay is simulated by repeated use of the pad character 189.Em \&pc . 190.pl -1 191.Pp 192The initial message, and login message, 193.Em \&im 194and 195.Em \&lm 196may include the character sequence 197.Em \&%h 198or 199.Em \&%t 200to obtain 201the hostname or tty name respectively. 202.Pf ( Em %% 203obtains a single '%' character.) 204The hostname is normally obtained from the system, 205but may be set by the 206.Em \&hn 207table entry. 208In either case it may be edited with 209.Em \&he . 210The 211.Em \&he 212string is a sequence of characters, each character that 213is neither '@' nor '#' is copied into the final hostname. 214A '@' in the 215.Em \&he 216string, causes one character from the real hostname to 217be copied to the final hostname. 218A '#' in the 219.Em \&he 220string, causes the next character of the real hostname 221to be skipped. 222Surplus '@' and '#' characters are ignored. 223.Pp 224When getty execs the login process, given 225in the 226.Em \&lo 227string (usually 228.Dq Pa /usr/bin/login ) , 229it will have set 230the environment to include the terminal type, as indicated 231by the 232.Em \&tt 233string (if it exists). 234The 235.Em \&ev 236string, can be used to enter additional data into 237the environment. 238It is a list of comma separated strings, each of which 239will presumably be of the form 240.Em name=value . 241.Pp 242If a non-zero timeout is specified, with 243.Em \&to , 244then getty will exit within the indicated 245number of seconds, either having 246received a login name and passed control 247to 248.Xr login , 249or having received an alarm signal, and exited. 250This may be useful to hangup dial in lines. 251.Pp 252Output from 253.Xr getty 254is even parity unless 255.Em \&op 256is specified. 257The 258.Em \&op 259string 260may be specified with 261.Em \&ap 262to allow any parity on input, but generate odd parity output. 263Note: this only applies while getty is being run, 264terminal driver limitations prevent a more complete 265implementation. 266.Xr Getty 267does not check parity of input characters in 268.Dv RAW 269mode. 270.Sh SEE ALSO 271.Xr login 1 , 272.Xr termcap 5 , 273.Xr getty 8 . 274.Sh BUGS 275The special characters (erase, kill, etc.) are reset to system defaults 276by 277.Xr login 1 . 278In 279.Em all 280cases, '#' or '^H' typed in a login name will be treated as 281an erase character, and '@' will be treated as a kill character. 282.Pp 283The delay stuff is a real crock. 284Apart form its general lack of flexibility, some 285of the delay algorithms are not implemented. 286The terminal driver should support sane delay settings. 287.Pp 288The 289.Em \&he 290capability is stupid. 291.Pp 292The 293.Xr termcap 294format is horrid, something more rational should 295have been chosen. 296.Sh HISTORY 297The 298.Nm gettytab 299file format appeared in 4.2BSD. 300