Annotation of src/libexec/getty/ttys.5, Revision 1.17
1.17 ! elad 1: .\" $NetBSD: ttys.5,v 1.16 2003/08/07 09:46:42 agc Exp $
1.7 thorpej 2: .\"
1.6 pk 3: .\" Copyright (c) 1985, 1991, 1993
4: .\" The Regents of the University of California. All rights reserved.
1.1 cgd 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.
1.16 agc 14: .\" 3. Neither the name of the University nor the names of its contributors
1.1 cgd 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: .\"
1.6 pk 30: .\" from: @(#)ttys.5 8.1 (Berkeley) 6/4/93
1.1 cgd 31: .\"
1.17 ! elad 32: .Dd October 7, 2006
1.1 cgd 33: .Dt TTYS 5
34: .Os
35: .Sh NAME
36: .Nm ttys
37: .Nd terminal initialization information
38: .Sh DESCRIPTION
39: The file
1.8 enami 40: .Nm
1.1 cgd 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.
1.13 fair 46: .Pp
1.10 fair 47: There is one line in the
1.8 enami 48: .Nm
1.1 cgd 49: file per special device file.
50: Fields are separated by tabs and/or spaces.
1.11 scottr 51: Fields comprising more than one word should be enclosed in double
1.1 cgd 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.
1.14 lukem 56: .Pp
57: Each line in
58: .Nm
59: has the format:
60: .Dl tty command type flags
1.1 cgd 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.
1.13 fair 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.
1.1 cgd 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
1.13 fair 83: is initialized with the value by either
1.1 cgd 84: .Xr getty 8
85: or
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
1.12 tsarna 94: will maintain for the terminal line
95: or a key into a database of tty attributes (currently unused).
1.1 cgd 96: .Pp
1.13 fair 97: .Bl -tag -width softcar
98: .It Sy on No or Sy off
1.10 fair 99: .Xr init 8
1.13 fair 100: should (or should not) execute the command given in the second field.
101: .It Sy secure
102: If
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
1.17 ! elad 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
1.13 fair 114: .Dv CLOCAL
1.17 ! elad 115: flag to be set on every open and thus modem control signal lines will be
! 116: ignored by default.
1.13 fair 117: .It Sy softcar
1.17 ! elad 118: Causes the driver to ignore hardware carrier on the line (by setting the
! 119: .Dv TIOCFLAG_SOFTCAR
! 120: .Xr tty 4
! 121: flag).
1.13 fair 122: .It Sy rtscts
1.17 ! elad 123: Sets the
! 124: .Dv TIOCFLAG_CRTSCTS
! 125: .Xr tty 4
1.13 fair 126: flag for the device to enable
127: .Tn RTS /
128: .Tn CTS
129: .Qq hardware
1.17 ! elad 130: flow control by default.
1.13 fair 131: .It Sy mdmbuf
1.17 ! elad 132: Sets the
! 133: .Dv TIOCFLAG_MDMBUF
! 134: .Xr tty 4
1.13 fair 135: flag for the device to enable
136: .Tn DTR /
137: .Tn DCD
138: .Qq hardware
1.17 ! elad 139: flow control by default.
1.13 fair 140: .El
141: .Pp
142: The flags
143: .Qq local ,
144: .Qq rtscts ,
145: .Qq mdmbuf ,
146: and
147: .Qq softcar
1.4 cgd 148: modify the default behaviour of the terminal line, and their actions
1.13 fair 149: are device driver dependent.
1.1 cgd 150: These flag fields should not be quoted.
151: .Pp
152: The string ``window='' may be followed by a quoted command
153: string which
1.10 fair 154: .Xr init 8
1.1 cgd 155: will execute
156: .Em before
157: starting the command specified by the second field.
1.12 tsarna 158: .Pp
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.
161: See
162: .Xr getttynam 3
163: for more information on this feature.
1.9 hubertf 164: .Pp
1.10 fair 165: After changing the
1.9 hubertf 166: .Nm
167: file a
168: .Dv SIGHUP
1.10 fair 169: signal can be sent to
1.9 hubertf 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
176: .Nm
177: file and spawn any necessary
178: .Xr getty 8
179: processes.
1.13 fair 180: .Pp
1.15 wiz 181: .Sy Nota Bene :
1.13 fair 182: Sending
183: .Dv SIGHUP
184: to
185: .Xr init 8
186: does
187: .Em not
188: change the state of the various
1.17 ! elad 189: .Xr tty 4
1.13 fair 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.
1.15 wiz 193: .Sh FILES
194: .Bl -tag -width /etc/ttys -compact
195: .It Pa /etc/ttys
196: .El
1.1 cgd 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
212: .Ed
213: .Sh SEE ALSO
214: .Xr login 1 ,
215: .Xr getttyent 3 ,
216: .Xr ttyslot 3 ,
1.17 ! elad 217: .Xr tty 4 ,
1.1 cgd 218: .Xr gettytab 5 ,
219: .Xr termcap 5 ,
220: .Xr getty 8 ,
1.4 cgd 221: .Xr init 8 ,
222: .Xr ttyflags 8
1.1 cgd 223: .Sh HISTORY
224: A
225: .Nm
226: file appeared in
227: .At v6 .
CVSweb <webmaster@jp.NetBSD.org>