xref: /csrg-svn/libexec/getty/gettytab.5 (revision 49643)
1*49643Scael.\" Copyright (c) 1983, 1991 The Regents of the University of California.
246040Sbostic.\" All rights reserved.
320833Smckusick.\"
4*49643Scael.\" %sccs.include.redist.roff%
520833Smckusick.\"
6*49643Scael.\"     @(#)gettytab.5	6.7 (Berkeley) 05/10/91
746040Sbostic.\"
8*49643Scael.Dd
9*49643Scael.Dt GETTYTAB 5
10*49643Scael.Os BSD 4.2
11*49643Scael.Sh NAME
12*49643Scael.Nm gettytab
13*49643Scael.Nd terminal configuration data base
14*49643Scael.Sh SYNOPSIS
15*49643Scael.Nm gettytab
16*49643Scael.Sh DESCRIPTION
17*49643ScaelThe
18*49643Scael.Nm gettytab
19*49643Scaelfile
2020833Smckusickis a simplified version of the
21*49643Scael.Xr termcap 5
2220833Smckusickdata base
2320833Smckusickused to describe terminal lines.
2420833SmckusickThe initial terminal login process
25*49643Scael.Xr getty 8
2620833Smckusickaccesses the
27*49643Scael.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.
32*49643Scael.Pp
3320833SmckusickThere is a default terminal class,
34*49643Scael.Em default ,
3520833Smckusickthat is used to set global defaults for all other classes.
3620833Smckusick(That is, the
37*49643Scael.Em default
3820833Smckusickentry is read, then the entry for the class required
3920833Smckusickis used to override particular settings.)
40*49643Scael.Sh CAPABILITIES
4120833SmckusickRefer to
42*49643Scael.Xr termcap 5
4320833Smckusickfor a description of the file layout.
4420833SmckusickThe
45*49643Scael.Em default
4620833Smckusickcolumn below lists defaults obtained if there is
4720833Smckusickno entry in the table obtained, nor one in the special
48*49643Scael.Em default
4920833Smckusicktable.
50*49643Scael.Bl -column Namexx /usr/bin/login Default
51*49643Scael.It Sy Name	Type	Default	Description
52*49643Scael.It "ap	bool	false	terminal uses any parity"
53*49643Scael.It "bd	num	0	backspace delay"
54*49643Scael.It "bk	str	0377	alternate end of line character (input break)"
55*49643Scael.It "cb	bool	false	use crt backspace mode"
56*49643Scael.It "cd	num	0	carriage-return delay"
57*49643Scael.It "ce	bool	false	use crt erase algorithm"
58*49643Scael.It "ck	bool	false	use crt kill algorithm"
59*49643Scael.It "cl	str" Ta Dv NULL	Ta
60*49643Scael.No "screen clear sequence"
61*49643Scael.It "co	bool	false	console - add"
62*49643Scael.Ql \en
63*49643Scaelafter login prompt
64*49643Scael.It "ds	str" Ta So Li ^Y Sc Ta
65*49643Scael.No "delayed suspend character"
66*49643Scael.It "dx	bool	false	set"
67*49643Scael.Dv DECCTLQ
68*49643Scael.It "ec	bool	false	leave echo"
69*49643Scael.Tn OFF
70*49643Scael.It "ep	bool	false	terminal uses even parity"
71*49643Scael.It "er	str" Ta So Li ^? Sc Ta
72*49643Scael.No "erase character"
73*49643Scael.It "et	str" Ta So Li ^D Sc Ta
74*49643Scael.No "end of text"
75*49643Scael.Pq Dv EOF
76*49643Scaelcharacter
77*49643Scael.It "ev	str" Ta Dv NULL	Ta
78*49643Scael.No "initial enviroment"
79*49643Scael.It "f0	num	unused	tty mode flags to write messages"
80*49643Scael.It "f1	num	unused	tty mode flags to read login name"
81*49643Scael.It "f2	num	unused	tty mode flags to leave terminal as"
82*49643Scael.It "fd	num	0	form-feed (vertical motion) delay"
83*49643Scael.It "fl	str" Ta So Li ^O Sc Ta
84*49643Scael.No "output flush character"
85*49643Scael.It "hc	bool	false	do"
86*49643Scael.Tn NOT
87*49643Scaelhangup line on last close
88*49643Scael.It "he	str" Ta Dv NULL	Ta
89*49643Scael.No "hostname editing string"
90*49643Scael.It "hn	str	hostname	hostname"
91*49643Scael.It "ht	bool	false	terminal has real tabs"
92*49643Scael.It "ig	bool	false	ignore garbage characters in login name"
93*49643Scael.It "im	str" Ta Dv NULL Ta
94*49643Scael.No "initial (banner) message"
95*49643Scael.It "in	str" Ta So Li ^C Sc Ta
96*49643Scael.No "interrupt character"
97*49643Scael.It "is	num	unused	input speed"
98*49643Scael.It "kl	str" Ta So Li ^U Sc Ta
99*49643Scael.No "kill character"
100*49643Scael.It "lc	bool	false	terminal has lower case"
101*49643Scael.It "lm	str	login:	login prompt"
102*49643Scael.It "ln	str" Ta So Li ^V Sc Ta
103*49643Scael.No "``literal next'' character"
104*49643Scael.It "lo	str" Ta Pa /usr/bin/login Ta
105*49643Scael.No "program to exec when name obtained"
106*49643Scael.It "nd	num	0	newline (line-feed) delay"
107*49643Scael.It "nl	bool	false	terminal has (or might have) a newline character"
108*49643Scael.It "nx	str	default	next table (for auto speed selection)"
109*49643Scael.It "op	bool	false	terminal uses odd parity"
110*49643Scael.It "os	num	unused	output speed"
111*49643Scael.It "pc	str" Ta So Li \e0 Sc Ta
112*49643Scael.No "pad character"
113*49643Scael.It "pe	bool	false	use printer (hard copy) erase algorithm"
114*49643Scael.It "pf	num	0	delay"
115*49643Scaelbetween first prompt and following flush (seconds)
116*49643Scael.It "ps	bool	false	line connected to a"
117*49643Scael.Tn MICOM
118*49643Scaelport selector
119*49643Scael.It "qu	str" Ta So Li \&^\e Sc Ta
120*49643Scael.No "quit character"
121*49643Scael.It "rp	str" Ta So Li ^R Sc Ta
122*49643Scael.No "line retype character"
123*49643Scael.It "rw	bool	false	do"
124*49643Scael.Tn NOT
125*49643Scaeluse raw for input, use cbreak
126*49643Scael.It "sp	num	unused	line speed (input and output)"
127*49643Scael.It "su	str" Ta So Li ^Z Sc Ta
128*49643Scael.No "suspend character"
129*49643Scael.It "tc	str	none	table continuation"
130*49643Scael.It "to	num	0	timeout (seconds)"
131*49643Scael.It "tt	str" Ta Dv NULL Ta
132*49643Scael.No "terminal type (for environment)"
133*49643Scael.It "ub	bool	false	do unbuffered output (of prompts etc)"
134*49643Scael.It "uc	bool	false	terminal is known upper case only"
135*49643Scael.It "we	str" Ta So Li ^W Sc Ta
136*49643Scael.No "word erase character"
137*49643Scael.It "xc	bool	false	do
138*49643Scael.Tn NOT
139*49643Scaelecho control chars as
140*49643Scael.Ql ^X
141*49643Scael.It "xf	str" Ta So Li ^S Sc Ta Dv XOFF
142*49643Scael(stop output) character
143*49643Scael.It "xn	str" Ta So Li ^Q Sc Ta Dv XON
144*49643Scael(start output) character
145*49643Scael.El
146*49643Scael.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.
151*49643Scael.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
159*49643Scael.Em \&f0 ,
160*49643Scael.Em \&f1 ,
161*49643Scaelor
162*49643Scael.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.
168*49643Scael.Pp
16920833SmckusickShould
170*49643Scael.Xr getty
17120833Smckusickreceive a null character
17220833Smckusick(presumed to indicate a line break)
17320833Smckusickit will restart using the table indicated by the
174*49643Scael.Em nx
17520833Smckusickentry. If there is none, it will re-use its original table.
176*49643Scael.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.
182*49643Scael.Pp
18320833SmckusickThe
184*49643Scael.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
188*49643Scael.Em \&pc .
189*49643Scael.Pp
19020833SmckusickThe initial message, and login message,
191*49643Scael.Em \&im
19220833Smckusickand
193*49643Scael.Em \&lm
194*49643Scaelmay include the character sequence
195*49643Scael.Em \&%h
196*49643Scaelor
197*49643Scael.Em \&%t
198*49643Scaelto obtain
19920834Smckusickthe hostname or tty name respectively.
200*49643Scael.Pf ( Em %%
201*49643Scaelobtains a single '%' character.)
20220833SmckusickThe hostname is normally obtained from the system,
20320833Smckusickbut may be set by the
204*49643Scael.Em \&hn
20520833Smckusicktable entry.
20620833SmckusickIn either case it may be edited with
207*49643Scael.Em \&he .
20820833SmckusickThe
209*49643Scael.Em \&he
21020833Smckusickstring is a sequence of characters, each character that
21120833Smckusickis neither '@' nor '#' is copied into the final hostname.
21220833SmckusickA '@' in the
213*49643Scael.Em \&he
21420833Smckusickstring, causes one character from the real hostname to
21520833Smckusickbe copied to the final hostname.
21620833SmckusickA '#' in the
217*49643Scael.Em \&he
21820833Smckusickstring, causes the next character of the real hostname
21920833Smckusickto be skipped.
22020833SmckusickSurplus '@' and '#' characters are ignored.
221*49643Scael.Pp
22220833SmckusickWhen getty execs the login process, given
22320833Smckusickin the
224*49643Scael.Em \&lo
225*49643Scaelstring (usually
226*49643Scael.Dq Pa /usr/bin/login ) ,
227*49643Scaelit will have set
22820833Smckusickthe enviroment to include the terminal type, as indicated
22920833Smckusickby the
230*49643Scael.Em \&tt
23120833Smckusickstring (if it exists).
23220833SmckusickThe
233*49643Scael.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
238*49643Scael.Em name=value .
239*49643Scael.Pp
24020833SmckusickIf a non-zero timeout is specified, with
241*49643Scael.Em \&to ,
24220833Smckusickthen getty will exit within the indicated
24320833Smckusicknumber of seconds, either having
24420833Smckusickreceived a login name and passed control
24520833Smckusickto
246*49643Scael.Xr login ,
24720833Smckusickor having received an alarm signal, and exited.
24820833SmckusickThis may be useful to hangup dial in lines.
249*49643Scael.Pp
25020833SmckusickOutput from
251*49643Scael.Xr getty
25220833Smckusickis even parity unless
253*49643Scael.Em \&op
25420833Smckusickis specified.
255*49643ScaelThe
256*49643Scael.Em \&op
257*49643Scaelstring
25820833Smckusickmay be specified with
259*49643Scael.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.
264*49643Scael.Xr Getty
26520833Smckusickdoes not check parity of input characters in
266*49643Scael.Dv RAW
26720833Smckusickmode.
268*49643Scael.Sh SEE ALSO
269*49643Scael.Xr login 1 ,
270*49643Scael.Xr termcap 5 ,
271*49643Scael.Xr getty 8 .
272*49643Scael.Sh BUGS
27328294SkarelsThe special characters (erase, kill, etc.) are reset to system defaults
27428294Skarelsby
275*49643Scael.Xr login 1 .
27620833SmckusickIn
277*49643Scael.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.
280*49643Scael.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.
285*49643Scael.Pp
28620833SmckusickThe
287*49643Scael.Em \&he
28820833Smckusickcapability is stupid.
289*49643Scael.Pp
290*49643ScaelThe
291*49643Scael.Xr termcap
29220833Smckusickformat is horrid, something more rational should
29320833Smckusickhave been chosen.
294*49643Scael.Sh HISTORY
295*49643ScaelThe
296*49643Scael.Nm gettytab
297*49643Scaelfile format appeared in 4.2BSD.
298