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