1.\" Copyright (c) 1983, 1991 The Regents of the University of California. 2.\" All rights reserved. 3.\" 4.\" %sccs.include.redist.roff% 5.\" 6.\" @(#)gettytab.5 6.7 (Berkeley) 05/10/91 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 enviroment" 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 "nx str default next table (for auto speed selection)" 109.It "op bool false terminal uses odd parity" 110.It "os num unused output speed" 111.It "pc str" Ta So Li \e0 Sc Ta 112.No "pad character" 113.It "pe bool false use printer (hard copy) erase algorithm" 114.It "pf num 0 delay" 115between first prompt and following flush (seconds) 116.It "ps bool false line connected to a" 117.Tn MICOM 118port selector 119.It "qu str" Ta So Li \&^\e Sc Ta 120.No "quit character" 121.It "rp str" Ta So Li ^R Sc Ta 122.No "line retype character" 123.It "rw bool false do" 124.Tn NOT 125use raw for input, use cbreak 126.It "sp num unused line speed (input and output)" 127.It "su str" Ta So Li ^Z Sc Ta 128.No "suspend character" 129.It "tc str none table continuation" 130.It "to num 0 timeout (seconds)" 131.It "tt str" Ta Dv NULL Ta 132.No "terminal type (for environment)" 133.It "ub bool false do unbuffered output (of prompts etc)" 134.It "uc bool false terminal is known upper case only" 135.It "we str" Ta So Li ^W Sc Ta 136.No "word erase character" 137.It "xc bool false do 138.Tn NOT 139echo control chars as 140.Ql ^X 141.It "xf str" Ta So Li ^S Sc Ta Dv XOFF 142(stop output) character 143.It "xn str" Ta So Li ^Q Sc Ta Dv XON 144(start output) character 145.El 146.Pp 147If no line speed is specified, speed will not be altered 148from that which prevails when getty is entered. 149Specifying an input or output speed will override 150line speed for stated direction only. 151.Pp 152Terminal modes to be used for the output of the message, 153for input of the login name, 154and to leave the terminal set as upon completion, 155are derived from the boolean flags specified. 156If the derivation should prove inadequate, 157any (or all) of these three may be overriden 158with one of the 159.Em \&f0 , 160.Em \&f1 , 161or 162.Em \&f2 163numeric specifications, which can be used to specify 164(usually in octal, with a leading '0') 165the exact values of the flags. 166Local (new tty) flags are set in the top 16 bits 167of this (32 bit) value. 168.Pp 169Should 170.Xr getty 171receive a null character 172(presumed to indicate a line break) 173it will restart using the table indicated by the 174.Em nx 175entry. If there is none, it will re-use its original table. 176.Pp 177Delays are specified in milliseconds, the nearest possible 178delay available in the tty driver will be used. 179Should greater certainty be desired, delays 180with values 0, 1, 2, and 3 are interpreted as 181choosing that particular delay algorithm from the driver. 182.Pp 183The 184.Em \&cl 185screen clear string may be preceded by a (decimal) number 186of milliseconds of delay required (a la termcap). 187This delay is simulated by repeated use of the pad character 188.Em \&pc . 189.Pp 190The initial message, and login message, 191.Em \&im 192and 193.Em \&lm 194may include the character sequence 195.Em \&%h 196or 197.Em \&%t 198to obtain 199the hostname or tty name respectively. 200.Pf ( Em %% 201obtains a single '%' character.) 202The hostname is normally obtained from the system, 203but may be set by the 204.Em \&hn 205table entry. 206In either case it may be edited with 207.Em \&he . 208The 209.Em \&he 210string is a sequence of characters, each character that 211is neither '@' nor '#' is copied into the final hostname. 212A '@' in the 213.Em \&he 214string, causes one character from the real hostname to 215be copied to the final hostname. 216A '#' in the 217.Em \&he 218string, causes the next character of the real hostname 219to be skipped. 220Surplus '@' and '#' characters are ignored. 221.Pp 222When getty execs the login process, given 223in the 224.Em \&lo 225string (usually 226.Dq Pa /usr/bin/login ) , 227it will have set 228the enviroment to include the terminal type, as indicated 229by the 230.Em \&tt 231string (if it exists). 232The 233.Em \&ev 234string, can be used to enter additional data into 235the environment. 236It is a list of comma separated strings, each of which 237will presumably be of the form 238.Em name=value . 239.Pp 240If a non-zero timeout is specified, with 241.Em \&to , 242then getty will exit within the indicated 243number of seconds, either having 244received a login name and passed control 245to 246.Xr login , 247or having received an alarm signal, and exited. 248This may be useful to hangup dial in lines. 249.Pp 250Output from 251.Xr getty 252is even parity unless 253.Em \&op 254is specified. 255The 256.Em \&op 257string 258may be specified with 259.Em \&ap 260to allow any parity on input, but generate odd parity output. 261Note: this only applies while getty is being run, 262terminal driver limitations prevent a more complete 263implementation. 264.Xr Getty 265does not check parity of input characters in 266.Dv RAW 267mode. 268.Sh SEE ALSO 269.Xr login 1 , 270.Xr termcap 5 , 271.Xr getty 8 . 272.Sh BUGS 273The special characters (erase, kill, etc.) are reset to system defaults 274by 275.Xr login 1 . 276In 277.Em all 278cases, '#' or '^H' typed in a login name will be treated as 279an erase character, and '@' will be treated as a kill character. 280.Pp 281The delay stuff is a real crock. 282Apart form its general lack of flexibility, some 283of the delay algorithms are not implemented. 284The terminal driver should support sane delay settings. 285.Pp 286The 287.Em \&he 288capability is stupid. 289.Pp 290The 291.Xr termcap 292format is horrid, something more rational should 293have been chosen. 294.Sh HISTORY 295The 296.Nm gettytab 297file format appeared in 4.2BSD. 298