161429Sbostic.\" Copyright (c) 1983, 1991, 1993 261429Sbostic.\" The Regents of the University of California. All rights reserved. 320833Smckusick.\" 449643Scael.\" %sccs.include.redist.roff% 520833Smckusick.\" 6*67347Sah.\" @(#)gettytab.5 8.5 (Berkeley) 06/01/94 746040Sbostic.\" 849643Scael.Dd 949643Scael.Dt GETTYTAB 5 1049643Scael.Os BSD 4.2 1149643Scael.Sh NAME 1249643Scael.Nm gettytab 1349643Scael.Nd terminal configuration data base 1449643Scael.Sh SYNOPSIS 1549643Scael.Nm gettytab 1649643Scael.Sh DESCRIPTION 1749643ScaelThe 1849643Scael.Nm gettytab 1949643Scaelfile 2020833Smckusickis a simplified version of the 2149643Scael.Xr termcap 5 2220833Smckusickdata base 2320833Smckusickused to describe terminal lines. 2420833SmckusickThe initial terminal login process 2549643Scael.Xr getty 8 2620833Smckusickaccesses the 2749643Scael.Nm gettytab 2820833Smckusickfile each time it starts, allowing simpler 2920833Smckusickreconfiguration of terminal characteristics. 3020833SmckusickEach entry in the data base 3120833Smckusickis used to describe one class of terminals. 3249643Scael.Pp 3320833SmckusickThere is a default terminal class, 3449643Scael.Em default , 3520833Smckusickthat is used to set global defaults for all other classes. 3620833Smckusick(That is, the 3749643Scael.Em default 3820833Smckusickentry is read, then the entry for the class required 3920833Smckusickis used to override particular settings.) 4049643Scael.Sh CAPABILITIES 4120833SmckusickRefer to 4249643Scael.Xr termcap 5 4320833Smckusickfor a description of the file layout. 4420833SmckusickThe 4549643Scael.Em default 4620833Smckusickcolumn below lists defaults obtained if there is 4720833Smckusickno entry in the table obtained, nor one in the special 4849643Scael.Em default 4920833Smckusicktable. 5049643Scael.Bl -column Namexx /usr/bin/login Default 5149643Scael.It Sy Name Type Default Description 5249643Scael.It "ap bool false terminal uses any parity" 5349643Scael.It "bd num 0 backspace delay" 5449643Scael.It "bk str 0377 alternate end of line character (input break)" 5549643Scael.It "cb bool false use crt backspace mode" 5649643Scael.It "cd num 0 carriage-return delay" 5749643Scael.It "ce bool false use crt erase algorithm" 5849643Scael.It "ck bool false use crt kill algorithm" 5949643Scael.It "cl str" Ta Dv NULL Ta 6049643Scael.No "screen clear sequence" 6149643Scael.It "co bool false console - add" 6249643Scael.Ql \en 6349643Scaelafter login prompt 6449643Scael.It "ds str" Ta So Li ^Y Sc Ta 6549643Scael.No "delayed suspend character" 6649643Scael.It "dx bool false set" 6749643Scael.Dv DECCTLQ 6849643Scael.It "ec bool false leave echo" 6949643Scael.Tn OFF 7049643Scael.It "ep bool false terminal uses even parity" 7149643Scael.It "er str" Ta So Li ^? Sc Ta 7249643Scael.No "erase character" 7349643Scael.It "et str" Ta So Li ^D Sc Ta 7449643Scael.No "end of text" 7549643Scael.Pq Dv EOF 7649643Scaelcharacter 7749643Scael.It "ev str" Ta Dv NULL Ta 7866974Sbostic.No "initial environment" 7949643Scael.It "f0 num unused tty mode flags to write messages" 8049643Scael.It "f1 num unused tty mode flags to read login name" 8149643Scael.It "f2 num unused tty mode flags to leave terminal as" 8249643Scael.It "fd num 0 form-feed (vertical motion) delay" 8349643Scael.It "fl str" Ta So Li ^O Sc Ta 8449643Scael.No "output flush character" 8549643Scael.It "hc bool false do" 8649643Scael.Tn NOT 8749643Scaelhangup line on last close 8849643Scael.It "he str" Ta Dv NULL Ta 8949643Scael.No "hostname editing string" 9049643Scael.It "hn str hostname hostname" 9149643Scael.It "ht bool false terminal has real tabs" 9249643Scael.It "ig bool false ignore garbage characters in login name" 9349643Scael.It "im str" Ta Dv NULL Ta 9449643Scael.No "initial (banner) message" 9549643Scael.It "in str" Ta So Li ^C Sc Ta 9649643Scael.No "interrupt character" 9749643Scael.It "is num unused input speed" 9849643Scael.It "kl str" Ta So Li ^U Sc Ta 9949643Scael.No "kill character" 10049643Scael.It "lc bool false terminal has lower case" 10149643Scael.It "lm str login: login prompt" 10249643Scael.It "ln str" Ta So Li ^V Sc Ta 10349643Scael.No "``literal next'' character" 10449643Scael.It "lo str" Ta Pa /usr/bin/login Ta 10549643Scael.No "program to exec when name obtained" 10649643Scael.It "nd num 0 newline (line-feed) delay" 10749643Scael.It "nl bool false terminal has (or might have) a newline character" 10866808Sbostic.It "np bool false terminal uses no parity (i.e. 8-bit characters)" 10949643Scael.It "nx str default next table (for auto speed selection)" 11049643Scael.It "op bool false terminal uses odd parity" 11149643Scael.It "os num unused output speed" 11249643Scael.It "pc str" Ta So Li \e0 Sc Ta 11349643Scael.No "pad character" 11449643Scael.It "pe bool false use printer (hard copy) erase algorithm" 11549643Scael.It "pf num 0 delay" 11649643Scaelbetween first prompt and following flush (seconds) 11749643Scael.It "ps bool false line connected to a" 11849643Scael.Tn MICOM 11949643Scaelport selector 12049643Scael.It "qu str" Ta So Li \&^\e Sc Ta 12149643Scael.No "quit character" 12249643Scael.It "rp str" Ta So Li ^R Sc Ta 12349643Scael.No "line retype character" 12449643Scael.It "rw bool false do" 12549643Scael.Tn NOT 12649643Scaeluse raw for input, use cbreak 12749643Scael.It "sp num unused line speed (input and output)" 12849643Scael.It "su str" Ta So Li ^Z Sc Ta 12949643Scael.No "suspend character" 13049643Scael.It "tc str none table continuation" 13149643Scael.It "to num 0 timeout (seconds)" 13249643Scael.It "tt str" Ta Dv NULL Ta 13349643Scael.No "terminal type (for environment)" 13449643Scael.It "ub bool false do unbuffered output (of prompts etc)" 13549643Scael.It "uc bool false terminal is known upper case only" 13649643Scael.It "we str" Ta So Li ^W Sc Ta 13749643Scael.No "word erase character" 13849643Scael.It "xc bool false do 13949643Scael.Tn NOT 14049643Scaelecho control chars as 14149643Scael.Ql ^X 14249643Scael.It "xf str" Ta So Li ^S Sc Ta Dv XOFF 14349643Scael(stop output) character 14449643Scael.It "xn str" Ta So Li ^Q Sc Ta Dv XON 14549643Scael(start output) character 14649643Scael.El 14749643Scael.Pp 14820833SmckusickIf no line speed is specified, speed will not be altered 14920833Smckusickfrom that which prevails when getty is entered. 15020833SmckusickSpecifying an input or output speed will override 15120833Smckusickline speed for stated direction only. 15249643Scael.Pp 15320833SmckusickTerminal modes to be used for the output of the message, 15420833Smckusickfor input of the login name, 15520833Smckusickand to leave the terminal set as upon completion, 15620833Smckusickare derived from the boolean flags specified. 15720833SmckusickIf the derivation should prove inadequate, 15866975Sbosticany (or all) of these three may be overridden 15920833Smckusickwith one of the 16049643Scael.Em \&f0 , 16149643Scael.Em \&f1 , 16249643Scaelor 16349643Scael.Em \&f2 16420833Smckusicknumeric specifications, which can be used to specify 16520833Smckusick(usually in octal, with a leading '0') 16620833Smckusickthe exact values of the flags. 16720833SmckusickLocal (new tty) flags are set in the top 16 bits 16820833Smckusickof this (32 bit) value. 16949643Scael.Pp 17020833SmckusickShould 17149643Scael.Xr getty 17220833Smckusickreceive a null character 17320833Smckusick(presumed to indicate a line break) 17420833Smckusickit will restart using the table indicated by the 17549643Scael.Em nx 17620833Smckusickentry. If there is none, it will re-use its original table. 17749643Scael.Pp 17820833SmckusickDelays are specified in milliseconds, the nearest possible 17920833Smckusickdelay available in the tty driver will be used. 18020833SmckusickShould greater certainty be desired, delays 18120833Smckusickwith values 0, 1, 2, and 3 are interpreted as 18220833Smckusickchoosing that particular delay algorithm from the driver. 18349643Scael.Pp 18420833SmckusickThe 18549643Scael.Em \&cl 18620833Smckusickscreen clear string may be preceded by a (decimal) number 18720833Smckusickof milliseconds of delay required (a la termcap). 18820833SmckusickThis delay is simulated by repeated use of the pad character 18949643Scael.Em \&pc . 190*67347Sah.pl -1 19149643Scael.Pp 19220833SmckusickThe initial message, and login message, 19349643Scael.Em \&im 19420833Smckusickand 19549643Scael.Em \&lm 19649643Scaelmay include the character sequence 19749643Scael.Em \&%h 19849643Scaelor 19949643Scael.Em \&%t 20049643Scaelto obtain 20120834Smckusickthe hostname or tty name respectively. 20249643Scael.Pf ( Em %% 20349643Scaelobtains a single '%' character.) 20420833SmckusickThe hostname is normally obtained from the system, 20520833Smckusickbut may be set by the 20649643Scael.Em \&hn 20720833Smckusicktable entry. 20820833SmckusickIn either case it may be edited with 20949643Scael.Em \&he . 21020833SmckusickThe 21149643Scael.Em \&he 21220833Smckusickstring is a sequence of characters, each character that 21320833Smckusickis neither '@' nor '#' is copied into the final hostname. 21420833SmckusickA '@' in the 21549643Scael.Em \&he 21620833Smckusickstring, causes one character from the real hostname to 21720833Smckusickbe copied to the final hostname. 21820833SmckusickA '#' in the 21949643Scael.Em \&he 22020833Smckusickstring, causes the next character of the real hostname 22120833Smckusickto be skipped. 22220833SmckusickSurplus '@' and '#' characters are ignored. 22349643Scael.Pp 22420833SmckusickWhen getty execs the login process, given 22520833Smckusickin the 22649643Scael.Em \&lo 22749643Scaelstring (usually 22849643Scael.Dq Pa /usr/bin/login ) , 22949643Scaelit will have set 23066974Sbosticthe environment to include the terminal type, as indicated 23120833Smckusickby the 23249643Scael.Em \&tt 23320833Smckusickstring (if it exists). 23420833SmckusickThe 23549643Scael.Em \&ev 23620833Smckusickstring, can be used to enter additional data into 23720833Smckusickthe environment. 23820833SmckusickIt is a list of comma separated strings, each of which 23920833Smckusickwill presumably be of the form 24049643Scael.Em name=value . 24149643Scael.Pp 24220833SmckusickIf a non-zero timeout is specified, with 24349643Scael.Em \&to , 24420833Smckusickthen getty will exit within the indicated 24520833Smckusicknumber of seconds, either having 24620833Smckusickreceived a login name and passed control 24720833Smckusickto 24849643Scael.Xr login , 24920833Smckusickor having received an alarm signal, and exited. 25020833SmckusickThis may be useful to hangup dial in lines. 25149643Scael.Pp 25220833SmckusickOutput from 25349643Scael.Xr getty 25420833Smckusickis even parity unless 25549643Scael.Em \&op 25620833Smckusickis specified. 25749643ScaelThe 25849643Scael.Em \&op 25949643Scaelstring 26020833Smckusickmay be specified with 26149643Scael.Em \&ap 26220833Smckusickto allow any parity on input, but generate odd parity output. 26320833SmckusickNote: this only applies while getty is being run, 26420833Smckusickterminal driver limitations prevent a more complete 26520833Smckusickimplementation. 26649643Scael.Xr Getty 26720833Smckusickdoes not check parity of input characters in 26849643Scael.Dv RAW 26920833Smckusickmode. 27049643Scael.Sh SEE ALSO 27149643Scael.Xr login 1 , 27249643Scael.Xr termcap 5 , 27349643Scael.Xr getty 8 . 27449643Scael.Sh BUGS 27528294SkarelsThe special characters (erase, kill, etc.) are reset to system defaults 27628294Skarelsby 27749643Scael.Xr login 1 . 27820833SmckusickIn 27949643Scael.Em all 28020833Smckusickcases, '#' or '^H' typed in a login name will be treated as 28120833Smckusickan erase character, and '@' will be treated as a kill character. 28249643Scael.Pp 28320833SmckusickThe delay stuff is a real crock. 28420833SmckusickApart form its general lack of flexibility, some 28520833Smckusickof the delay algorithms are not implemented. 28620833SmckusickThe terminal driver should support sane delay settings. 28749643Scael.Pp 28820833SmckusickThe 28949643Scael.Em \&he 29020833Smckusickcapability is stupid. 29149643Scael.Pp 29249643ScaelThe 29349643Scael.Xr termcap 29420833Smckusickformat is horrid, something more rational should 29520833Smckusickhave been chosen. 29649643Scael.Sh HISTORY 29749643ScaelThe 29849643Scael.Nm gettytab 29949643Scaelfile format appeared in 4.2BSD. 300