1*61429Sbostic.\" Copyright (c) 1983, 1991, 1993 2*61429Sbostic.\" The Regents of the University of California. All rights reserved. 320833Smckusick.\" 449643Scael.\" %sccs.include.redist.roff% 520833Smckusick.\" 6*61429Sbostic.\" @(#)gettytab.5 8.1 (Berkeley) 06/04/93 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 7849643Scael.No "initial enviroment" 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" 10849643Scael.It "nx str default next table (for auto speed selection)" 10949643Scael.It "op bool false terminal uses odd parity" 11049643Scael.It "os num unused output speed" 11149643Scael.It "pc str" Ta So Li \e0 Sc Ta 11249643Scael.No "pad character" 11349643Scael.It "pe bool false use printer (hard copy) erase algorithm" 11449643Scael.It "pf num 0 delay" 11549643Scaelbetween first prompt and following flush (seconds) 11649643Scael.It "ps bool false line connected to a" 11749643Scael.Tn MICOM 11849643Scaelport selector 11949643Scael.It "qu str" Ta So Li \&^\e Sc Ta 12049643Scael.No "quit character" 12149643Scael.It "rp str" Ta So Li ^R Sc Ta 12249643Scael.No "line retype character" 12349643Scael.It "rw bool false do" 12449643Scael.Tn NOT 12549643Scaeluse raw for input, use cbreak 12649643Scael.It "sp num unused line speed (input and output)" 12749643Scael.It "su str" Ta So Li ^Z Sc Ta 12849643Scael.No "suspend character" 12949643Scael.It "tc str none table continuation" 13049643Scael.It "to num 0 timeout (seconds)" 13149643Scael.It "tt str" Ta Dv NULL Ta 13249643Scael.No "terminal type (for environment)" 13349643Scael.It "ub bool false do unbuffered output (of prompts etc)" 13449643Scael.It "uc bool false terminal is known upper case only" 13549643Scael.It "we str" Ta So Li ^W Sc Ta 13649643Scael.No "word erase character" 13749643Scael.It "xc bool false do 13849643Scael.Tn NOT 13949643Scaelecho control chars as 14049643Scael.Ql ^X 14149643Scael.It "xf str" Ta So Li ^S Sc Ta Dv XOFF 14249643Scael(stop output) character 14349643Scael.It "xn str" Ta So Li ^Q Sc Ta Dv XON 14449643Scael(start output) character 14549643Scael.El 14649643Scael.Pp 14720833SmckusickIf no line speed is specified, speed will not be altered 14820833Smckusickfrom that which prevails when getty is entered. 14920833SmckusickSpecifying an input or output speed will override 15020833Smckusickline speed for stated direction only. 15149643Scael.Pp 15220833SmckusickTerminal modes to be used for the output of the message, 15320833Smckusickfor input of the login name, 15420833Smckusickand to leave the terminal set as upon completion, 15520833Smckusickare derived from the boolean flags specified. 15620833SmckusickIf the derivation should prove inadequate, 15720833Smckusickany (or all) of these three may be overriden 15820833Smckusickwith one of the 15949643Scael.Em \&f0 , 16049643Scael.Em \&f1 , 16149643Scaelor 16249643Scael.Em \&f2 16320833Smckusicknumeric specifications, which can be used to specify 16420833Smckusick(usually in octal, with a leading '0') 16520833Smckusickthe exact values of the flags. 16620833SmckusickLocal (new tty) flags are set in the top 16 bits 16720833Smckusickof this (32 bit) value. 16849643Scael.Pp 16920833SmckusickShould 17049643Scael.Xr getty 17120833Smckusickreceive a null character 17220833Smckusick(presumed to indicate a line break) 17320833Smckusickit will restart using the table indicated by the 17449643Scael.Em nx 17520833Smckusickentry. If there is none, it will re-use its original table. 17649643Scael.Pp 17720833SmckusickDelays are specified in milliseconds, the nearest possible 17820833Smckusickdelay available in the tty driver will be used. 17920833SmckusickShould greater certainty be desired, delays 18020833Smckusickwith values 0, 1, 2, and 3 are interpreted as 18120833Smckusickchoosing that particular delay algorithm from the driver. 18249643Scael.Pp 18320833SmckusickThe 18449643Scael.Em \&cl 18520833Smckusickscreen clear string may be preceded by a (decimal) number 18620833Smckusickof milliseconds of delay required (a la termcap). 18720833SmckusickThis delay is simulated by repeated use of the pad character 18849643Scael.Em \&pc . 18949643Scael.Pp 19020833SmckusickThe initial message, and login message, 19149643Scael.Em \&im 19220833Smckusickand 19349643Scael.Em \&lm 19449643Scaelmay include the character sequence 19549643Scael.Em \&%h 19649643Scaelor 19749643Scael.Em \&%t 19849643Scaelto obtain 19920834Smckusickthe hostname or tty name respectively. 20049643Scael.Pf ( Em %% 20149643Scaelobtains a single '%' character.) 20220833SmckusickThe hostname is normally obtained from the system, 20320833Smckusickbut may be set by the 20449643Scael.Em \&hn 20520833Smckusicktable entry. 20620833SmckusickIn either case it may be edited with 20749643Scael.Em \&he . 20820833SmckusickThe 20949643Scael.Em \&he 21020833Smckusickstring is a sequence of characters, each character that 21120833Smckusickis neither '@' nor '#' is copied into the final hostname. 21220833SmckusickA '@' in the 21349643Scael.Em \&he 21420833Smckusickstring, causes one character from the real hostname to 21520833Smckusickbe copied to the final hostname. 21620833SmckusickA '#' in the 21749643Scael.Em \&he 21820833Smckusickstring, causes the next character of the real hostname 21920833Smckusickto be skipped. 22020833SmckusickSurplus '@' and '#' characters are ignored. 22149643Scael.Pp 22220833SmckusickWhen getty execs the login process, given 22320833Smckusickin the 22449643Scael.Em \&lo 22549643Scaelstring (usually 22649643Scael.Dq Pa /usr/bin/login ) , 22749643Scaelit will have set 22820833Smckusickthe enviroment to include the terminal type, as indicated 22920833Smckusickby the 23049643Scael.Em \&tt 23120833Smckusickstring (if it exists). 23220833SmckusickThe 23349643Scael.Em \&ev 23420833Smckusickstring, can be used to enter additional data into 23520833Smckusickthe environment. 23620833SmckusickIt is a list of comma separated strings, each of which 23720833Smckusickwill presumably be of the form 23849643Scael.Em name=value . 23949643Scael.Pp 24020833SmckusickIf a non-zero timeout is specified, with 24149643Scael.Em \&to , 24220833Smckusickthen getty will exit within the indicated 24320833Smckusicknumber of seconds, either having 24420833Smckusickreceived a login name and passed control 24520833Smckusickto 24649643Scael.Xr login , 24720833Smckusickor having received an alarm signal, and exited. 24820833SmckusickThis may be useful to hangup dial in lines. 24949643Scael.Pp 25020833SmckusickOutput from 25149643Scael.Xr getty 25220833Smckusickis even parity unless 25349643Scael.Em \&op 25420833Smckusickis specified. 25549643ScaelThe 25649643Scael.Em \&op 25749643Scaelstring 25820833Smckusickmay be specified with 25949643Scael.Em \&ap 26020833Smckusickto allow any parity on input, but generate odd parity output. 26120833SmckusickNote: this only applies while getty is being run, 26220833Smckusickterminal driver limitations prevent a more complete 26320833Smckusickimplementation. 26449643Scael.Xr Getty 26520833Smckusickdoes not check parity of input characters in 26649643Scael.Dv RAW 26720833Smckusickmode. 26849643Scael.Sh SEE ALSO 26949643Scael.Xr login 1 , 27049643Scael.Xr termcap 5 , 27149643Scael.Xr getty 8 . 27249643Scael.Sh BUGS 27328294SkarelsThe special characters (erase, kill, etc.) are reset to system defaults 27428294Skarelsby 27549643Scael.Xr login 1 . 27620833SmckusickIn 27749643Scael.Em all 27820833Smckusickcases, '#' or '^H' typed in a login name will be treated as 27920833Smckusickan erase character, and '@' will be treated as a kill character. 28049643Scael.Pp 28120833SmckusickThe delay stuff is a real crock. 28220833SmckusickApart form its general lack of flexibility, some 28320833Smckusickof the delay algorithms are not implemented. 28420833SmckusickThe terminal driver should support sane delay settings. 28549643Scael.Pp 28620833SmckusickThe 28749643Scael.Em \&he 28820833Smckusickcapability is stupid. 28949643Scael.Pp 29049643ScaelThe 29149643Scael.Xr termcap 29220833Smckusickformat is horrid, something more rational should 29320833Smckusickhave been chosen. 29449643Scael.Sh HISTORY 29549643ScaelThe 29649643Scael.Nm gettytab 29749643Scaelfile format appeared in 4.2BSD. 298