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*66975Sbostic.\" @(#)gettytab.5 8.4 (Berkeley) 04/19/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, 158*66975Sbosticany (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 . 19049643Scael.Pp 19120833SmckusickThe initial message, and login message, 19249643Scael.Em \&im 19320833Smckusickand 19449643Scael.Em \&lm 19549643Scaelmay include the character sequence 19649643Scael.Em \&%h 19749643Scaelor 19849643Scael.Em \&%t 19949643Scaelto obtain 20020834Smckusickthe hostname or tty name respectively. 20149643Scael.Pf ( Em %% 20249643Scaelobtains a single '%' character.) 20320833SmckusickThe hostname is normally obtained from the system, 20420833Smckusickbut may be set by the 20549643Scael.Em \&hn 20620833Smckusicktable entry. 20720833SmckusickIn either case it may be edited with 20849643Scael.Em \&he . 20920833SmckusickThe 21049643Scael.Em \&he 21120833Smckusickstring is a sequence of characters, each character that 21220833Smckusickis neither '@' nor '#' is copied into the final hostname. 21320833SmckusickA '@' in the 21449643Scael.Em \&he 21520833Smckusickstring, causes one character from the real hostname to 21620833Smckusickbe copied to the final hostname. 21720833SmckusickA '#' in the 21849643Scael.Em \&he 21920833Smckusickstring, causes the next character of the real hostname 22020833Smckusickto be skipped. 22120833SmckusickSurplus '@' and '#' characters are ignored. 22249643Scael.Pp 22320833SmckusickWhen getty execs the login process, given 22420833Smckusickin the 22549643Scael.Em \&lo 22649643Scaelstring (usually 22749643Scael.Dq Pa /usr/bin/login ) , 22849643Scaelit will have set 22966974Sbosticthe environment to include the terminal type, as indicated 23020833Smckusickby the 23149643Scael.Em \&tt 23220833Smckusickstring (if it exists). 23320833SmckusickThe 23449643Scael.Em \&ev 23520833Smckusickstring, can be used to enter additional data into 23620833Smckusickthe environment. 23720833SmckusickIt is a list of comma separated strings, each of which 23820833Smckusickwill presumably be of the form 23949643Scael.Em name=value . 24049643Scael.Pp 24120833SmckusickIf a non-zero timeout is specified, with 24249643Scael.Em \&to , 24320833Smckusickthen getty will exit within the indicated 24420833Smckusicknumber of seconds, either having 24520833Smckusickreceived a login name and passed control 24620833Smckusickto 24749643Scael.Xr login , 24820833Smckusickor having received an alarm signal, and exited. 24920833SmckusickThis may be useful to hangup dial in lines. 25049643Scael.Pp 25120833SmckusickOutput from 25249643Scael.Xr getty 25320833Smckusickis even parity unless 25449643Scael.Em \&op 25520833Smckusickis specified. 25649643ScaelThe 25749643Scael.Em \&op 25849643Scaelstring 25920833Smckusickmay be specified with 26049643Scael.Em \&ap 26120833Smckusickto allow any parity on input, but generate odd parity output. 26220833SmckusickNote: this only applies while getty is being run, 26320833Smckusickterminal driver limitations prevent a more complete 26420833Smckusickimplementation. 26549643Scael.Xr Getty 26620833Smckusickdoes not check parity of input characters in 26749643Scael.Dv RAW 26820833Smckusickmode. 26949643Scael.Sh SEE ALSO 27049643Scael.Xr login 1 , 27149643Scael.Xr termcap 5 , 27249643Scael.Xr getty 8 . 27349643Scael.Sh BUGS 27428294SkarelsThe special characters (erase, kill, etc.) are reset to system defaults 27528294Skarelsby 27649643Scael.Xr login 1 . 27720833SmckusickIn 27849643Scael.Em all 27920833Smckusickcases, '#' or '^H' typed in a login name will be treated as 28020833Smckusickan erase character, and '@' will be treated as a kill character. 28149643Scael.Pp 28220833SmckusickThe delay stuff is a real crock. 28320833SmckusickApart form its general lack of flexibility, some 28420833Smckusickof the delay algorithms are not implemented. 28520833SmckusickThe terminal driver should support sane delay settings. 28649643Scael.Pp 28720833SmckusickThe 28849643Scael.Em \&he 28920833Smckusickcapability is stupid. 29049643Scael.Pp 29149643ScaelThe 29249643Scael.Xr termcap 29320833Smckusickformat is horrid, something more rational should 29420833Smckusickhave been chosen. 29549643Scael.Sh HISTORY 29649643ScaelThe 29749643Scael.Nm gettytab 29849643Scaelfile format appeared in 4.2BSD. 299