xref: /netbsd-src/libexec/getty/ttys.5 (revision 95d875fb90b1458e4f1de6950286ddcd6644bc61)
1.\"	$NetBSD: ttys.5,v 1.12 1999/01/15 18:47:49 tsarna 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. All advertising materials mentioning features or use of this software
15.\"    must display the following acknowledgement:
16.\"	This product includes software developed by the University of
17.\"	California, Berkeley and its contributors.
18.\" 4. Neither the name of the University nor the names of its contributors
19.\"    may be used to endorse or promote products derived from this software
20.\"    without specific prior written permission.
21.\"
22.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32.\" SUCH DAMAGE.
33.\"
34.\"     from: @(#)ttys.5	8.1 (Berkeley) 6/4/93
35.\"
36.Dd June 4, 1993
37.Dt TTYS 5
38.Os
39.Sh NAME
40.Nm ttys
41.Nd terminal initialization information
42.Sh DESCRIPTION
43The file
44.Nm
45contains information that is used by various routines to initialize
46and control the use of terminal special files.
47This information is read with the
48.Xr getttyent 3
49library routines.
50There is one line in the
51.Nm
52file per special device file.
53Fields are separated by tabs and/or spaces.
54Fields comprising more than one word should be enclosed in double
55quotes (``"'').
56Blank lines and comments may appear anywhere in the file; comments
57are delimited by hash marks (``#'') and new lines.
58Any unspecified fields will default to null.
59.Pp
60The first field is the
61name of the terminal special file as it is found in
62.Pa /dev .
63.Pp
64The second field of the file is the command to execute for the line,
65usually
66.Xr getty 8 ,
67which initializes and opens the line, setting the speed, waiting for
68a user name and executing the
69.Xr login 1
70program.
71It can be, however, any desired command, for example
72the start up for a window system terminal emulator or some other
73daemon process, and can contain multiple words if quoted.
74.Pp
75The third field is the type of terminal usually connected to that
76tty line, normally the one found in the
77.Xr termcap 5
78data base file.
79The environment variable
80.Dv TERM
81is initialized with the value by
82either
83.Xr getty 8
84or
85.Xr login 1 .
86.Pp
87The remaining fields set flags in the
88.Fa ty_status
89entry (see
90.Xr getttyent 3 )
91or specify a window system process that
92.Xr init 8
93will maintain for the terminal line
94or a key into a database of tty attributes (currently unused).
95.Pp
96As flag values, the strings ``on'' and ``off'' specify that
97.Xr init 8
98should (should not) execute the command given in the second field,
99while ``secure'' (if ``on'' is also specified) allows users with a
100uid of 0 to login on
101this line.
102The flags ``local'', ``rtscts'', ``mdmbuf'', and ``softcar''
103modify the default behaviour of the terminal line, and their actions
104are driver dependent.
105The ``local'' flag causes the driver to
106treat the line as if it locally connected.
107The ``rtscts'' flag
108instructs the driver to use RTS/CTS hardware flow control, if
109possible.
110The ``mdmbuf'' flag instructs the driver to use
111DTR/DCD flow control, if possible.
112The ``softcar'' flag causes the driver to ignore
113hardware carrier on the line.
114These flag fields should not be quoted.
115.Pp
116The string ``window='' may be followed by a quoted command
117string which
118.Xr init 8
119will execute
120.Em before
121starting the command specified by the second field.
122.Pp
123The string ``class='' may be followed by a quoted string used
124as a key into a database of attributes for that category of tty.
125See
126.Xr getttynam 3
127for more information on this feature.
128.Pp
129After changing the
130.Nm
131file a
132.Dv SIGHUP
133signal can be sent to
134.Xr init 8
135with the command
136.Dq Li "kill \-s HUP 1" .
137On receipt of this signal,
138.Xr init 8
139will re-read the
140.Nm
141file and spawn any necessary
142.Xr getty 8
143processes.
144.Sh EXAMPLES
145.Bd -literal
146# root login on console at 1200 baud
147console	"/usr/libexec/getty std.1200"	vt100	on secure
148# dialup at 1200 baud, no root logins
149ttyd0	"/usr/libexec/getty d1200"	dialup	on	# 555-1234
150# Mike's terminal: hp2621
151ttyh0	"/usr/libexec/getty std.9600"	hp2621-nl	on	# 457 Evans
152# John's terminal: vt100
153ttyh1	"/usr/libexec/getty std.9600"	vt100	on		# 459 Evans
154# terminal emulate/window system
155ttyv0	"/usr/new/xterm -L :0"		vs100	on window="/usr/new/Xvs100 0"
156# Network pseudo ttys -- don't enable getty
157ttyp0	none	network
158ttyp1	none	network	off
159.Ed
160.Sh FILES
161.Bl -tag -width /etc/ttys -compact
162.It Pa /etc/ttys
163.El
164.Sh SEE ALSO
165.Xr login 1 ,
166.Xr getttyent 3 ,
167.Xr ttyslot 3 ,
168.Xr gettytab 5 ,
169.Xr termcap 5 ,
170.Xr getty 8 ,
171.Xr init 8 ,
172.Xr ttyflags 8
173.Sh HISTORY
174A
175.Nm
176file appeared in
177.At v6 .
178