]>
Commit | Line | Data |
---|---|---|
1815bff5 A |
1 | .\" Copyright (c) 1985, 1991, 1993 |
2 | .\" The Regents of the University of California. All rights reserved. | |
3 | .\" | |
4 | .\" Redistribution and use in source and binary forms, with or without | |
5 | .\" modification, are permitted provided that the following conditions | |
6 | .\" are met: | |
7 | .\" 1. Redistributions of source code must retain the above copyright | |
8 | .\" notice, this list of conditions and the following disclaimer. | |
9 | .\" 2. Redistributions in binary form must reproduce the above copyright | |
10 | .\" notice, this list of conditions and the following disclaimer in the | |
11 | .\" documentation and/or other materials provided with the distribution. | |
12 | .\" 3. All advertising materials mentioning features or use of this software | |
13 | .\" must display the following acknowledgement: | |
14 | .\" This product includes software developed by the University of | |
15 | .\" California, Berkeley and its contributors. | |
16 | .\" 4. Neither the name of the University nor the names of its contributors | |
17 | .\" may be used to endorse or promote products derived from this software | |
18 | .\" without specific prior written permission. | |
19 | .\" | |
20 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | |
21 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
22 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
23 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
24 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
25 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
26 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
27 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
28 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
30 | .\" SUCH DAMAGE. | |
31 | .\" | |
32 | .\" from: @(#)ttys.5 8.1 (Berkeley) 6/4/93 | |
34d340d7 A |
33 | .\" $FreeBSD: src/libexec/getty/ttys.5,v 1.18 2005/06/14 08:40:10 ru Exp $ |
34 | .\" " | |
35 | .Dd May 27, 2005 | |
1815bff5 A |
36 | .Dt TTYS 5 |
37 | .Os | |
38 | .Sh NAME | |
39 | .Nm ttys | |
40 | .Nd terminal initialization information | |
41 | .Sh DESCRIPTION | |
42 | The file | |
34d340d7 | 43 | .Nm |
1815bff5 A |
44 | contains information that is used by various routines to initialize |
45 | and control the use of terminal special files. | |
46 | This information is read with the | |
47 | .Xr getttyent 3 | |
48 | library routines. | |
34d340d7 A |
49 | There is one line in the |
50 | .Nm | |
1815bff5 A |
51 | file per special device file. |
52 | Fields are separated by tabs and/or spaces. | |
53 | Fields comprised of more than one word should be enclosed in double | |
54 | quotes (``"''). | |
55 | Blank lines and comments may appear anywhere in the file; comments | |
56 | are delimited by hash marks (``#'') and new lines. | |
57 | Any unspecified fields will default to null. | |
58 | .Pp | |
34d340d7 | 59 | The first field is normally the |
1815bff5 A |
60 | name of the terminal special file as it is found in |
61 | .Pa /dev . | |
34d340d7 A |
62 | However, it can be any arbitrary string |
63 | when the associated command is not related to a tty. | |
1815bff5 A |
64 | .Pp |
65 | The second field of the file is the command to execute for the line, | |
66 | usually | |
67 | .Xr getty 8 , | |
68 | which initializes and opens the line, setting the speed, waiting for | |
69 | a user name and executing the | |
70 | .Xr login 1 | |
71 | program. | |
72 | It can be, however, any desired command, for example | |
73 | the start up for a window system terminal emulator or some other | |
74 | daemon process, and can contain multiple words if quoted. | |
75 | .Pp | |
76 | The third field is the type of terminal usually connected to that | |
77 | tty line, normally the one found in the | |
78 | .Xr termcap 5 | |
79 | data base file. | |
80 | The environment variable | |
34d340d7 | 81 | .Ev TERM |
1815bff5 A |
82 | is initialized with the value by |
83 | either | |
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 | |
34d340d7 A |
91 | .Xr getttyent 3 ) , |
92 | specify a window system process that | |
93 | .Xr launchd 8 | |
1815bff5 A |
94 | will maintain for the terminal line. |
95 | .Pp | |
96 | As flag values, the strings ``on'' and ``off'' specify that | |
34d340d7 | 97 | .Xr launchd 8 |
1815bff5 A |
98 | should (should not) execute the command given in the second field, |
99 | while ``secure'' (if ``on'' is also specified) allows users with a | |
100 | uid of 0 to login on | |
101 | this line. | |
102 | The flags ``local'', ``rtscts'', ``mdmbuf'', and ``softcar'' | |
103 | modify the default behaviour of the terminal line, and their actions | |
104 | are driver dependent. | |
105 | The ``local'' flag causes the driver to | |
106 | treat the line as if it locally connected. | |
107 | The ``rtscts'' flag | |
108 | instructs the driver to use RTS/CTS hardware flow control, if | |
109 | possible. | |
110 | The ``mdmbuf'' flag instructs the driver to use | |
111 | DTR/DCD flow control, if possible. | |
112 | The ``softcar'' flag causes the driver to ignore | |
113 | hardware carrier on the line. | |
114 | These flag fields should not be quoted. | |
115 | .Pp | |
116 | The string ``window='' may be followed by a quoted command | |
117 | string which | |
34d340d7 | 118 | .Xr launchd 8 |
1815bff5 A |
119 | will execute |
120 | .Em before | |
121 | starting the command specified by the second field. | |
34d340d7 A |
122 | .Sh FILES |
123 | .Bl -tag -width /etc/ttys -compact | |
124 | .It Pa /etc/ttys | |
125 | .El | |
126 | .Sh NUMERIC SEQUENCES | |
127 | Numeric sequences of terminals can be represented in a more compact format. | |
128 | A matching pair of square bracket may enclose two numbers (the start and | |
129 | stop values), separated by a hyphen. | |
130 | The numbers are assumed to be decimal, unless prefixed with ``0x'', in which | |
131 | case they are interpreted as hexadecimal. | |
132 | The number of characters (not including any ``0x'') in the starting value gives | |
133 | the minimum width; sequence values are zero padded up to this width. | |
134 | Thus ``tty[00-07]'' represents the eight terminals ``tty00'' through ``tty07''. | |
1815bff5 A |
135 | .Sh EXAMPLES |
136 | .Bd -literal | |
137 | # root login on console at 1200 baud | |
138 | console "/usr/libexec/getty std.1200" vt100 on secure | |
139 | # dialup at 1200 baud, no root logins | |
34d340d7 | 140 | ttyd0 "/usr/libexec/getty d1200" dialup on # 555-1234 |
1815bff5 | 141 | # Mike's terminal: hp2621 |
34d340d7 | 142 | ttyh0 "/usr/libexec/getty std.9600" hp2621-nl on # 457 Evans |
1815bff5 | 143 | # John's terminal: vt100 |
34d340d7 | 144 | ttyh1 "/usr/libexec/getty std.9600" vt100 on # 459 Evans |
1815bff5 | 145 | # terminal emulate/window system |
34d340d7 A |
146 | ttyv0 "/usr/X11/bin/xterm -display :0" xterm on window="/usr/X11/bin/X :0" |
147 | # the sequence of eight terminals tty00 through tty07 | |
148 | tty[00-07] "/usr/libexec/getty std.9600" vt100 on | |
1815bff5 | 149 | # Network pseudo ttys -- don't enable getty |
34d340d7 A |
150 | ttyp0 none network |
151 | ttyp1 none network off | |
152 | # All sixteen of a pseudo tty sequence | |
153 | ttyq[0x0-0xf] none network | |
1815bff5 | 154 | .Ed |
1815bff5 A |
155 | .Sh SEE ALSO |
156 | .Xr login 1 , | |
157 | .Xr getttyent 3 , | |
158 | .Xr ttyslot 3 , | |
159 | .Xr gettytab 5 , | |
160 | .Xr termcap 5 , | |
161 | .Xr getty 8 , | |
34d340d7 A |
162 | .Xr launchd 8 |
163 | .\" .Xr ttyflags 8 | |
1815bff5 A |
164 | .Sh HISTORY |
165 | A | |
166 | .Nm | |
167 | file appeared in | |
168 | .At v6 . |