1*aa6c9a01Smillert.\" $OpenBSD: ttys.5,v 1.14 2022/07/29 13:56:36 millert Exp $ 2*aa6c9a01Smillert.\" 3df930be7Sderaadt.\" Copyright (c) 1985, 1991, 1993 4df930be7Sderaadt.\" The Regents of the University of California. All rights reserved. 5df930be7Sderaadt.\" 6df930be7Sderaadt.\" Redistribution and use in source and binary forms, with or without 7df930be7Sderaadt.\" modification, are permitted provided that the following conditions 8df930be7Sderaadt.\" are met: 9df930be7Sderaadt.\" 1. Redistributions of source code must retain the above copyright 10df930be7Sderaadt.\" notice, this list of conditions and the following disclaimer. 11df930be7Sderaadt.\" 2. Redistributions in binary form must reproduce the above copyright 12df930be7Sderaadt.\" notice, this list of conditions and the following disclaimer in the 13df930be7Sderaadt.\" documentation and/or other materials provided with the distribution. 14e33d3bd3Smillert.\" 3. Neither the name of the University nor the names of its contributors 15df930be7Sderaadt.\" may be used to endorse or promote products derived from this software 16df930be7Sderaadt.\" without specific prior written permission. 17df930be7Sderaadt.\" 18df930be7Sderaadt.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 19df930be7Sderaadt.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20df930be7Sderaadt.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21df930be7Sderaadt.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 22df930be7Sderaadt.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23df930be7Sderaadt.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24df930be7Sderaadt.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25df930be7Sderaadt.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26df930be7Sderaadt.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27df930be7Sderaadt.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28df930be7Sderaadt.\" SUCH DAMAGE. 29df930be7Sderaadt.\" 30df930be7Sderaadt.\" from: @(#)ttys.5 8.1 (Berkeley) 6/4/93 31df930be7Sderaadt.\" 32*aa6c9a01Smillert.Dd $Mdocdate: July 29 2022 $ 33df930be7Sderaadt.Dt TTYS 5 34df930be7Sderaadt.Os 35df930be7Sderaadt.Sh NAME 36df930be7Sderaadt.Nm ttys 37df930be7Sderaadt.Nd terminal initialization information 38df930be7Sderaadt.Sh DESCRIPTION 392e1f860aSaaronThe 402e1f860aSaaron.Nm 412e1f860aSaaronfile contains information that is used by various routines to initialize 42df930be7Sderaadtand control the use of terminal special files. 43df930be7SderaadtThis information is read with the 44df930be7Sderaadt.Xr getttyent 3 45df930be7Sderaadtlibrary routines. 46*aa6c9a01Smillert.Pp 47df930be7SderaadtThere is one line in the 482e1f860aSaaron.Nm 49df930be7Sderaadtfile per special device file. 50df930be7SderaadtFields are separated by tabs and/or spaces. 512e1f860aSaaronFields comprised of more than one word should be enclosed in double quotes 522e1f860aSaaron.Pq Ql \&" . 53df930be7SderaadtBlank lines and comments may appear anywhere in the file; comments 542e1f860aSaaronare delimited by hash marks 552e1f860aSaaron.Pq Ql # 562e1f860aSaaronand newlines. 57df930be7SderaadtAny unspecified fields will default to null. 58df930be7Sderaadt.Pp 59*aa6c9a01SmillertEach line in 60*aa6c9a01Smillert.Nm 61*aa6c9a01Smillertis of the format: 62*aa6c9a01Smillert.Dl tty command type flags 63*aa6c9a01Smillert.Pp 64df930be7SderaadtThe first field is the 65df930be7Sderaadtname of the terminal special file as it is found in 66df930be7Sderaadt.Pa /dev . 67df930be7Sderaadt.Pp 68*aa6c9a01SmillertThe second field is the command to execute for the line, 69df930be7Sderaadtusually 70df930be7Sderaadt.Xr getty 8 , 71df930be7Sderaadtwhich initializes and opens the line, setting the speed, waiting for 72df930be7Sderaadta user name and executing the 73df930be7Sderaadt.Xr login 1 74*aa6c9a01Smillertutility. 75df930be7SderaadtIt can be, however, any desired command, for example 76df930be7Sderaadtthe start up for a window system terminal emulator or some other 77df930be7Sderaadtdaemon process, and can contain multiple words if quoted. 78df930be7Sderaadt.Pp 79df930be7SderaadtThe third field is the type of terminal usually connected to that 80*aa6c9a01Smillerttty line, normally the one found in the 81*aa6c9a01Smillert.Xr terminfo 5 82df930be7Sderaadtdatabase file. 83df930be7SderaadtThe environment variable 84df930be7Sderaadt.Dv TERM 852e1f860aSaaronis initialized with the value by either 86df930be7Sderaadt.Xr getty 8 87df930be7Sderaadtor 88df930be7Sderaadt.Xr login 1 . 89df930be7Sderaadt.Pp 90df930be7SderaadtThe remaining fields set flags in the 91df930be7Sderaadt.Fa ty_status 92df930be7Sderaadtentry (see 93df930be7Sderaadt.Xr getttyent 3 ) 94df930be7Sderaadtor specify a window system process that 95df930be7Sderaadt.Xr init 8 96df930be7Sderaadtwill maintain for the terminal line. 97*aa6c9a01SmillertThe following is a list of permitted flags for each tty: 989b44b86fSderaadt.Bl -tag -width xxxxxxx 999b44b86fSderaadt.It Ar on 1009b44b86fSderaadtSpecify that 101bd9e08d2Smpech.Xr init 8 1029b44b86fSderaadtshould execute the command given in the second field. 1039b44b86fSderaadt.It Ar off 1049b44b86fSderaadtThe opposite of on. 1059b44b86fSderaadt.It Ar secure 1062e1f860aSaaronIf 1079b44b86fSderaadt.Ar on 108*aa6c9a01Smillertis also specified, allows users with a user ID of 0 to log in on this line. 1094f71449dSmpfIf set for the 1104f71449dSmpf.Ar console 1114f71449dSmpfentry, then 1124f71449dSmpf.Xr init 8 1134f71449dSmpfwill start a single-user shell without asking for the superuser password. 1149b44b86fSderaadt.El 115df930be7Sderaadt.Pp 116165b137aSmillertAdditionally, the following flags modify the default behavior of 1172e1f860aSaaronthe terminal line. 1182e1f860aSaaronSome of these flags may not be supported by a terminal line driver. 1192e1f860aSaaronThe flag fields should not be quoted. 1209b44b86fSderaadt.Bl -tag -width xxxxxxx 1219b44b86fSderaadt.It Ar local 1229b44b86fSderaadtTreat the line as if it is locally connected. 1239b44b86fSderaadt.It Ar rtscts 1249b44b86fSderaadtUse RTS/CTS hardware flow control, if 1259b44b86fSderaadtpossible. 1269b44b86fSderaadt.It Ar mdmbuf 1279b44b86fSderaadtUse DTR/DCD flow control if possible. 1289b44b86fSderaadt.It Ar softcar 1299b44b86fSderaadtIgnore hardware carrier on the line. 1309b44b86fSderaadt.El 1319b44b86fSderaadt.Pp 1329b44b86fSderaadtThe string 1339b44b86fSderaadt.Ar window= 1349b44b86fSderaadtmay be followed by a quoted command string which 135bd9e08d2Smpech.Xr init 8 136df930be7Sderaadtwill execute 137df930be7Sderaadt.Em before 138df930be7Sderaadtstarting the command specified by the second field. 1390aed10ebSjmc.Pp 140*aa6c9a01SmillertChanges to the 141*aa6c9a01Smillert.Nm 142*aa6c9a01Smillertfile take effect after it has been reloaded by 1430aed10ebSjmc.Xr init 8 , 1440aed10ebSjmcwhich can be triggered by sending it a 1450aed10ebSjmc.Dv HUP 1460aed10ebSjmcsignal. 147*aa6c9a01SmillertReloading the 148*aa6c9a01Smillert.Nm 149*aa6c9a01Smillertfile does 150*aa6c9a01Smillert.Em not 151*aa6c9a01Smillertchange the state of the device-specific terminal flags described above. 152*aa6c9a01SmillertThe 153*aa6c9a01Smillert.Xr ttyflags 8 154*aa6c9a01Smillertutility can be used to set those flags. 155fbaa3c82Sjmc.Sh FILES 156fbaa3c82Sjmc.Bl -tag -width /etc/ttys -compact 157fbaa3c82Sjmc.It Pa /etc/ttys 158fbaa3c82Sjmc.El 159df930be7Sderaadt.Sh EXAMPLES 160df930be7Sderaadt.Bd -literal 161df930be7Sderaadt# root login on console at 1200 baud 162df930be7Sderaadtconsole "/usr/libexec/getty std.1200" vt100 on secure 163df930be7Sderaadt# dialup at 1200 baud, no root logins 164df930be7Sderaadtttyd0 "/usr/libexec/getty d1200" dialup on # 555-1234 165df930be7Sderaadt# Mike's terminal: hp2621 166df930be7Sderaadtttyh0 "/usr/libexec/getty std.9600" hp2621-nl on # 457 Evans 167df930be7Sderaadt# John's terminal: vt100 168df930be7Sderaadtttyh1 "/usr/libexec/getty std.9600" vt100 on # 459 Evans 169df930be7Sderaadt# terminal emulate/window system 170df930be7Sderaadtttyv0 "/usr/new/xterm -L :0" vs100 on window="/usr/new/Xvs100 0" 171df930be7Sderaadt# Network pseudo ttys -- don't enable getty 172df930be7Sderaadtttyp0 none network 173df930be7Sderaadtttyp1 none network off 174df930be7Sderaadt.Ed 175df930be7Sderaadt.Sh SEE ALSO 176df930be7Sderaadt.Xr login 1 , 177df930be7Sderaadt.Xr getttyent 3 , 178df930be7Sderaadt.Xr ttyslot 3 , 179df930be7Sderaadt.Xr gettytab 5 , 180df930be7Sderaadt.Xr termcap 5 , 181df930be7Sderaadt.Xr getty 8 , 182df930be7Sderaadt.Xr init 8 , 183df930be7Sderaadt.Xr ttyflags 8 184df930be7Sderaadt.Sh HISTORY 185df930be7SderaadtA 186df930be7Sderaadt.Nm 187df930be7Sderaadtfile appeared in 18801c04610Sjsg.At v5 . 189