zpool(8) uses tbl.
[netbsd-mini2440.git] / libexec / getty / ttys.5
blobf1de2923ca24b671fea3d25c91712fb87e3bd5e9
1 .\"     $NetBSD: ttys.5,v 1.16 2003/08/07 09:46:42 agc Exp $
2 .\"
3 .\" Copyright (c) 1985, 1991, 1993
4 .\"     The Regents of the University of California.  All rights reserved.
5 .\"
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
8 .\" are met:
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\"    notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\"    notice, this list of conditions and the following disclaimer in the
13 .\"    documentation and/or other materials provided with the distribution.
14 .\" 3. Neither the name of the University nor the names of its contributors
15 .\"    may be used to endorse or promote products derived from this software
16 .\"    without specific prior written permission.
17 .\"
18 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .\" SUCH DAMAGE.
29 .\"
30 .\"     from: @(#)ttys.5        8.1 (Berkeley) 6/4/93
31 .\"
32 .Dd October 7, 2006
33 .Dt TTYS 5
34 .Os
35 .Sh NAME
36 .Nm ttys
37 .Nd terminal initialization information
38 .Sh DESCRIPTION
39 The file
40 .Nm
41 contains information that is used by various routines to initialize
42 and control the use of terminal special files.
43 This information is read with the
44 .Xr getttyent 3
45 library routines.
46 .Pp
47 There is one line in the
48 .Nm
49 file per special device file.
50 Fields are separated by tabs and/or spaces.
51 Fields comprising more than one word should be enclosed in double
52 quotes (``"'').
53 Blank lines and comments may appear anywhere in the file; comments
54 are delimited by hash marks (``#'') and new lines.
55 Any unspecified fields will default to null.
56 .Pp
57 Each line in
58 .Nm
59 has the format:
60 .Dl tty command type flags
61 .Pp
62 The first field is the
63 name of the terminal special file as it is found in
64 .Pa /dev .
65 .Pp
66 The second field of the file is the command to execute for the line,
67 usually
68 .Xr getty 8 ,
69 which initializes and opens the line, setting the speed, waiting for
70 a user name and executing the
71 .Xr login 1
72 program.
73 However, it can be any desired command, for example the start up
74 for a window system terminal emulator or some other daemon process,
75 and can contain multiple words if quoted.
76 .Pp
77 The third field is the type of terminal usually connected to that
78 tty line, normally the one found in the
79 .Xr termcap 5
80 data base file.
81 The environment variable
82 .Dv TERM
83 is initialized with the value by either
84 .Xr getty 8
86 .Xr login 1 .
87 .Pp
88 The remaining fields set flags in the
89 .Fa ty_status
90 entry (see
91 .Xr getttyent 3 )
92 or specify a window system process that
93 .Xr init 8
94 will maintain for the terminal line
95 or a key into a database of tty attributes (currently unused).
96 .Pp
97 .Bl -tag -width softcar
98 .It Sy on No or Sy off
99 .Xr init 8
100 should (or should not) execute the command given in the second field.
101 .It Sy secure
103 .Sy on
104 is specified, allows users with a uid of 0
105 .Pq e.g. Qq root
106 to login on this line.
107 .It Sy local
108 Sets the
109 .Dv TIOCFLAG_CLOCAL
110 .Xr tty 4
111 flag for the device.
112 This will cause the
113 .Xr termios 4
114 .Dv CLOCAL
115 flag to be set on every open and thus modem control signal lines will be
116 ignored by default.
117 .It Sy softcar
118 Causes the driver to ignore hardware carrier on the line (by setting the
119 .Dv TIOCFLAG_SOFTCAR
120 .Xr tty 4
121 flag).
122 .It Sy rtscts
123 Sets the
124 .Dv TIOCFLAG_CRTSCTS
125 .Xr tty 4
126 flag for the device to enable
127 .Tn RTS /
128 .Tn CTS
129 .Qq hardware
130 flow control by default.
131 .It Sy mdmbuf
132 Sets the
133 .Dv TIOCFLAG_MDMBUF
134 .Xr tty 4
135 flag for the device to enable
136 .Tn DTR /
137 .Tn DCD
138 .Qq hardware
139 flow control by default.
142 The flags
143 .Qq local ,
144 .Qq rtscts ,
145 .Qq mdmbuf ,
147 .Qq softcar
148 modify the default behaviour of the terminal line, and their actions
149 are device driver dependent.
150 These flag fields should not be quoted.
152 The string ``window='' may be followed by a quoted command
153 string which
154 .Xr init 8
155 will execute
156 .Em before
157 starting the command specified by the second field.
159 The string ``class='' may be followed by a quoted string used
160 as a key into a database of attributes for that category of tty.
162 .Xr getttynam 3
163 for more information on this feature.
165 After changing the
167 file a
168 .Dv SIGHUP
169 signal can be sent to
170 .Xr init 8
171 with the command
172 .Dq Li "kill \-s HUP 1" .
173 On receipt of this signal,
174 .Xr init 8
175 will re-read the
177 file and spawn any necessary
178 .Xr getty 8
179 processes.
181 .Sy Nota Bene :
182 Sending
183 .Dv SIGHUP
185 .Xr init 8
186 does
187 .Em not
188 change the state of the various
189 .Xr tty 4
190 device flags listed above; the
191 .Xr ttyflags 8
192 program must be run for changes in those flags to take effect on the devices.
193 .Sh FILES
194 .Bl -tag -width /etc/ttys -compact
195 .It Pa /etc/ttys
197 .Sh EXAMPLES
198 .Bd -literal
199 # root login on console at 1200 baud
200 console "/usr/libexec/getty std.1200"   vt100   on secure
201 # dialup at 1200 baud, no root logins
202 ttyd0   "/usr/libexec/getty d1200"      dialup  on      # 555-1234
203 # Mike's terminal: hp2621
204 ttyh0   "/usr/libexec/getty std.9600"   hp2621-nl       on      # 457 Evans
205 # John's terminal: vt100
206 ttyh1   "/usr/libexec/getty std.9600"   vt100   on              # 459 Evans
207 # terminal emulate/window system
208 ttyv0   "/usr/new/xterm -L :0"          vs100   on window="/usr/new/Xvs100 0"
209 # Network pseudo ttys -- don't enable getty
210 ttyp0   none    network
211 ttyp1   none    network off
213 .Sh SEE ALSO
214 .Xr login 1 ,
215 .Xr getttyent 3 ,
216 .Xr ttyslot 3 ,
217 .Xr tty 4 ,
218 .Xr gettytab 5 ,
219 .Xr termcap 5 ,
220 .Xr getty 8 ,
221 .Xr init 8 ,
222 .Xr ttyflags 8
223 .Sh HISTORY
226 file appeared in
227 .At v6 .