448 lines
13 KiB
Groff
448 lines
13 KiB
Groff
.\" $NetBSD: gettytab.5,v 1.40 2019/07/15 01:26:15 uwe Exp $
|
|
.\"
|
|
.\" Copyright (c) 1983, 1991, 1993
|
|
.\" The Regents of the University of California. All rights reserved.
|
|
.\"
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
.\" modification, are permitted provided that the following conditions
|
|
.\" are met:
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
.\" 3. Neither the name of the University nor the names of its contributors
|
|
.\" may be used to endorse or promote products derived from this software
|
|
.\" without specific prior written permission.
|
|
.\"
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
.\" SUCH DAMAGE.
|
|
.\"
|
|
.\" from: @(#)gettytab.5 8.4 (Berkeley) 4/19/94
|
|
.\"
|
|
.Dd April 5, 2012
|
|
.Dt GETTYTAB 5
|
|
.Os
|
|
.Sh NAME
|
|
.Nm gettytab
|
|
.Nd terminal configuration data base
|
|
.Sh SYNOPSIS
|
|
.Nm
|
|
.Sh DESCRIPTION
|
|
The
|
|
.Nm
|
|
file
|
|
is a simplified version of the
|
|
.Xr capfile 5
|
|
data base
|
|
used to describe terminal lines.
|
|
The initial terminal login process
|
|
.Xr getty 8
|
|
accesses the
|
|
.Nm
|
|
file each time it starts, allowing simpler
|
|
reconfiguration of terminal characteristics.
|
|
Each entry in the data base
|
|
is used to describe one class of terminals.
|
|
.Pp
|
|
Where to run
|
|
.Xr getty 8
|
|
processes is normally defined by
|
|
.Xr ttys 5 .
|
|
.Pp
|
|
There is a default terminal class,
|
|
.Ic default ,
|
|
that is used to set global defaults for all other classes.
|
|
(That is, the
|
|
.Ic default
|
|
entry is read, then the entry for the class required
|
|
is used to override particular settings.)
|
|
The
|
|
.Ic default
|
|
entry is also normally read by other programs that present login prompts
|
|
to the user, such as
|
|
.Xr telnetd 8 ,
|
|
in order to retrieve the values of the
|
|
.Ic \&he ,
|
|
.Ic \&hn ,
|
|
.Ic \&im ,
|
|
and
|
|
.Ic \&if
|
|
capabilities.
|
|
.Sh CAPABILITIES
|
|
Refer to
|
|
.Xr capfile 5
|
|
for a description of the file layout.
|
|
The
|
|
.Sq Sy Default
|
|
column below lists defaults obtained if there is
|
|
no entry in the table obtained, nor one in the special
|
|
.Ic default
|
|
table.
|
|
.Bl -column ".Sy Name" ".Sy Type" "/usr/bin/login"
|
|
.It Sy Name Ta Sy Type Ta Sy Default Ta Sy Description
|
|
.It Ic \&ab Ta bool Ta false Ta Auto-baud speed select mechanism for the
|
|
Micom 600 portselector. Selection is done by looking at how the
|
|
character
|
|
.Ql \er
|
|
is garbled at 300, 1200, 4800, and 9600 baud.
|
|
.It Ic \&al Ta str Ta Dv NULL Ta user to auto-login instead of prompting
|
|
.It Ic \&ap Ta bool Ta false Ta terminal uses any parity
|
|
.It Ic \&bk Ta str Ta Li \e377 Ta alternative end of line character (input break)
|
|
.Pq Dv VEOL
|
|
.It Ic \&b2 Ta str Ta Li \e377 Ta alternative end of line character (input break)
|
|
.Pq Dv VEOL2
|
|
.It Ic \&c0 Ta num Ta unused Ta tty control flags to write messages
|
|
.It Ic \&c1 Ta num Ta unused Ta tty control flags to read login name
|
|
.It Ic \&c2 Ta num Ta unused Ta tty control flags to leave terminal as
|
|
.It Ic \&ce Ta bool Ta false Ta use Tn CRT erase algorithm
|
|
.It Ic \&ck Ta bool Ta false Ta use Tn CRT kill algorithm
|
|
.It Ic \&cl Ta str Ta Dv NULL Ta screen clear sequence
|
|
.It Ic \&co Ta bool Ta false Ta console \(en add
|
|
.Ql \er\en
|
|
after login prompt
|
|
.It Ic \&cs Ta bool Ta false Ta clear screen based on terminal type in
|
|
.Pa /etc/ttys
|
|
.It Ic \&ds Ta str Ta So Li "^Y" Sc Ta delayed suspend character
|
|
.Pq Dv VDSUSP
|
|
.It Ic \&dx Ta bool Ta false Ta set Dv DECCTLQ
|
|
.It Ic \&ec Ta bool Ta false Ta leave echo
|
|
.Tn OFF
|
|
.It Ic \&ep Ta bool Ta false Ta terminal uses even parity
|
|
.It Ic \&er Ta str Ta So Li ^? Sc Ta erase character
|
|
.Pq Dv VERASE
|
|
.It Ic \&et Ta str Ta So Li ^D Sc Ta end of text
|
|
.Pq Dv VEOF
|
|
character
|
|
.It Ic \&ev Ta str Ta Dv NULL Ta initial environment
|
|
.It Ic \&f0 Ta num Ta unused Ta tty mode flags to write messages
|
|
.It Ic \&f1 Ta num Ta unused Ta tty mode flags to read login name
|
|
.It Ic \&f2 Ta num Ta unused Ta tty mode flags to leave terminal as
|
|
.It Ic \&fl Ta str Ta So Li ^O Sc Ta output flush character
|
|
.Pq Dv VDISCARD
|
|
.It Ic \&hc Ta bool Ta false Ta do
|
|
.Tn NOT
|
|
hangup line on last close
|
|
.It Ic \&he Ta str Ta Dv NULL Ta hostname editing string
|
|
.It Ic \&hn Ta str Ta hostname Ta hostname
|
|
.It Ic \&ht Ta bool Ta false Ta terminal has real tabs
|
|
.It Ic \&i0 Ta num Ta unused Ta tty input flags to write messages
|
|
.It Ic \&i1 Ta num Ta unused Ta tty input flags to read login name
|
|
.It Ic \&i2 Ta num Ta unused Ta tty input flags to leave terminal as
|
|
.It Ic \&if Ta str Ta Dv NULL Ta display named file before prompt,
|
|
like
|
|
.Pa /etc/issue
|
|
.It Ic \&ig Ta bool Ta false Ta ignore garbage characters in login name
|
|
.It Ic \&im Ta str Ta Dv NULL Ta initial (banner) message
|
|
.It Ic \&in Ta str Ta So Li ^C Sc Ta interrupt character
|
|
.Pq Dv VINTR
|
|
.It Ic \&is Ta num Ta unused Ta input speed
|
|
.It Ic \&kl Ta str Ta So Li ^U Sc Ta kill character
|
|
.Pq Dv VKILL
|
|
.It Ic \&l0 Ta num Ta unused Ta tty local flags to write messages
|
|
.It Ic \&l1 Ta num Ta unused Ta tty local flags to read login name
|
|
.It Ic \&l2 Ta num Ta unused Ta tty local flags to leave terminal as
|
|
.It Ic \&lc Ta bool Ta false Ta terminal has lower case
|
|
.It Ic \&lm Ta str Ta login: Ta login prompt
|
|
.It Ic \&ln Ta str Ta So Li ^V Sc Ta So literal next Sc character
|
|
.Pq Dv VLNEXT
|
|
.It Ic \&lo Ta str Ta /usr/bin/login Ta program to exec when name obtained
|
|
.It Ic \&mb Ta bool Ta false Ta do flow control based on carrier
|
|
.It Ic \&nl Ta bool Ta false Ta terminal has (or might have) a newline character
|
|
.It Ic \&nn Ta bool Ta false Ta do not prompt for a login name
|
|
.It Ic \&np Ta bool Ta false Ta terminal uses no parity (i.e. 8-bit characters)
|
|
.It Ic \&nx Ta str Ta default Ta next table (for auto speed selection)
|
|
.It Ic \&o0 Ta num Ta unused Ta tty output flags to write messages
|
|
.It Ic \&o1 Ta num Ta unused Ta tty output flags to read login name
|
|
.It Ic \&o2 Ta num Ta unused Ta tty output flags to leave terminal as
|
|
.It Ic \&op Ta bool Ta false Ta terminal uses odd parity
|
|
.It Ic \&os Ta num Ta unused Ta output speed
|
|
.It Ic \&pc Ta str Ta So Li \e0 Sc Ta pad character
|
|
.It Ic \&pe Ta bool Ta false Ta use printer (hard copy) erase algorithm
|
|
.It Ic \&pf Ta num Ta 0 Ta delay between first prompt and following
|
|
flush (seconds)
|
|
.It Ic \&pp Ta str Ta unused Ta Tn PPP authentication program
|
|
.It Ic \&ps Ta bool Ta false Ta line connected to a
|
|
.Tn MICOM
|
|
port selector
|
|
.It Ic \&qu Ta str Ta So Li \&^\e Sc Ta quit character
|
|
.Pq Dv VQUIT
|
|
.It Ic \&rp Ta str Ta So Li ^R Sc Ta line retype character
|
|
.Pq Dv VREPRINT
|
|
.It Ic \&rw Ta bool Ta false Ta do
|
|
.Tn NOT
|
|
use
|
|
.Dv RAW
|
|
for input, use
|
|
.Dv CBREAK
|
|
.It Ic \&sp Ta num Ta unused Ta line speed (input and output)
|
|
.It Ic \&st Ta str Ta So Li ^T Sc Ta status character
|
|
.Pq Dv VSTATUS
|
|
.It Ic \&su Ta str Ta So Li ^Z Sc Ta suspend character
|
|
.Pq Dv VSUSP
|
|
.It Ic \&tc Ta str Ta none Ta table continuation
|
|
.It Ic \&to Ta num Ta 0 Ta timeout (seconds)
|
|
.It Ic \&tt Ta str Ta Dv NULL Ta terminal type (for environment)
|
|
.It Ic \&ub Ta bool Ta false Ta do unbuffered output (of prompts etc)
|
|
.It Ic \&we Ta str Ta So Li ^W Sc Ta word erase character
|
|
.Pq Dv VWERASE
|
|
.It Ic \&xc Ta bool Ta false Ta do
|
|
.Tn NOT
|
|
echo control chars as
|
|
.Ql ^X
|
|
.It Ic \&xf Ta str Ta So Li ^S Sc Ta Tn XOFF
|
|
(stop output) character
|
|
.Pq Dv VSTOP
|
|
.It Ic \&xn Ta str Ta So Li ^Q Sc Ta Tn XON
|
|
(start output) character
|
|
.Pq Dv VSTART
|
|
.El
|
|
.Pp
|
|
The following capabilities are no longer supported by
|
|
.Xr getty 8 :
|
|
.Bl -column ".Sy Name" ".Sy Type" "/usr/bin/login"
|
|
.It Ic \&bd Ta num Ta 0 Ta backspace delay
|
|
.It Ic \&cb Ta bool Ta false Ta use Tn CRT backspace mode
|
|
.It Ic \&cd Ta num Ta 0 Ta carriage-return delay
|
|
.It Ic \&fd Ta num Ta 0 Ta form-feed (vertical motion) delay
|
|
.It Ic \&nd Ta num Ta 0 Ta newline (line-feed) delay
|
|
.It Ic \&uc Ta bool Ta false Ta terminal is known upper case only
|
|
.El
|
|
.Pp
|
|
If no line speed is specified, speed will not be altered
|
|
from that which prevails when getty is entered.
|
|
Specifying an input or output speed will override
|
|
line speed for stated direction only.
|
|
.Pp
|
|
Terminal modes to be used for the output of the message,
|
|
for input of the login name,
|
|
and to leave the terminal set as upon completion,
|
|
are derived from the boolean flags specified.
|
|
If the derivation should prove inadequate,
|
|
any (or all) of these three may be overridden
|
|
with one of the
|
|
.Ic \&c0 ,
|
|
.Ic \&c1 ,
|
|
.Ic \&c2 ,
|
|
.Ic \&i0 ,
|
|
.Ic \&i1 ,
|
|
.Ic \&i2 ,
|
|
.Ic \&l0 ,
|
|
.Ic \&l1 ,
|
|
.Ic \&l2 ,
|
|
.Ic \&o0 ,
|
|
.Ic \&o1 ,
|
|
or
|
|
.Ic \&o2
|
|
numeric specifications, which can be used to specify
|
|
(usually in octal, with a leading
|
|
.Ql 0 )
|
|
the exact values of the flags.
|
|
These flags correspond to the termios
|
|
.Fa c_cflag ,
|
|
.Fa c_iflag ,
|
|
.Fa c_lflag ,
|
|
and
|
|
.Fa c_oflag
|
|
fields, respectively.
|
|
Each these sets must be completely specified to be effective.
|
|
The
|
|
.Ic \&f0 ,
|
|
.Ic \&f1 ,
|
|
and
|
|
.Ic \&f2
|
|
are excepted for backwards compatibility with a previous incarnation of
|
|
the TTY sub-system.
|
|
In these flags the bottom 16 bits of the (32 bits) value contain the
|
|
.Vt sgttyb
|
|
.Fa sg_flags
|
|
field, while the top 16 bits represent the local mode word.
|
|
.Pp
|
|
Should
|
|
.Xr getty 8
|
|
receive a null character
|
|
(presumed to indicate a line break)
|
|
it will restart using the table indicated by the
|
|
.Ic nx
|
|
entry.
|
|
If there is none, it will re-use its original table.
|
|
.Pp
|
|
Delays are specified in milliseconds, the nearest possible
|
|
delay available in the tty driver will be used.
|
|
Should greater certainty be desired, delays
|
|
with values 0, 1, 2, and 3 are interpreted as
|
|
choosing that particular delay algorithm from the driver.
|
|
.Pp
|
|
The
|
|
.Ic \&cl
|
|
screen clear string may be preceded by a (decimal) number
|
|
of milliseconds of delay required (a la termcap).
|
|
This delay is simulated by repeated use of the pad character
|
|
.Ic \&pc .
|
|
.Pp
|
|
The initial message
|
|
.Ic \&im\^ ,
|
|
and login message
|
|
.Ic \&lm
|
|
may include any of the following character sequences, which expand to
|
|
information about the environment in which
|
|
.Xr getty 8
|
|
is running.
|
|
.Bl -tag -width ".Li XXXX"
|
|
.It Li \&%d
|
|
The current date.
|
|
.It Li \&%h
|
|
The hostname of the machine, which is normally obtained from the
|
|
system using
|
|
.Xr gethostname 3 ,
|
|
but may also be overridden by the
|
|
.Ic \&hn
|
|
table entry.
|
|
In either case it may be edited with the
|
|
.Ic \&he
|
|
string.
|
|
A
|
|
.Ql @
|
|
in the
|
|
.Ic \&he
|
|
string causes one character from the real hostname to
|
|
be copied to the final hostname.
|
|
A
|
|
.Ql #
|
|
in the
|
|
.Ic \&he
|
|
string causes the next character of the real hostname
|
|
to be skipped.
|
|
Each character that
|
|
is neither
|
|
.Ql @
|
|
nor
|
|
.Ql #
|
|
is copied into the final hostname.
|
|
Surplus
|
|
.Ql @
|
|
and
|
|
.Ql #
|
|
characters are ignored.
|
|
.It Li \&%t
|
|
The tty name.
|
|
.It Li \&%m , \&%r , \&%s , \&%v
|
|
The type of machine, release of the operating system, name of the
|
|
operating system, and version of the kernel, respectively, as
|
|
returned by
|
|
.Xr uname 3 .
|
|
.It Li \&%%
|
|
A
|
|
.Ql %
|
|
character.
|
|
.El
|
|
.Pp
|
|
When getty execs the login process, given
|
|
in the
|
|
.Ic \&lo
|
|
string (usually
|
|
.Dq Pa /usr/bin/login ) ,
|
|
it will have set
|
|
the environment to include the terminal type, as indicated
|
|
by the
|
|
.Ic \&tt
|
|
string (if it exists).
|
|
The
|
|
.Ic \&ev
|
|
string, can be used to enter additional data into
|
|
the environment.
|
|
It is a list of comma separated strings, each of which
|
|
will presumably be of the form
|
|
.Ar name Ns Li \^= Ns Ar value .
|
|
.Pp
|
|
If a non-zero timeout is specified, with
|
|
.Ic \&to ,
|
|
then getty will exit within the indicated
|
|
number of seconds, either having
|
|
received a login name and passed control
|
|
to
|
|
.Xr login 1 ,
|
|
or having received an alarm signal, and exited.
|
|
This may be useful to hangup dial in lines.
|
|
.Pp
|
|
Output from
|
|
.Xr getty 8
|
|
is even parity unless
|
|
.Ic \&op
|
|
or
|
|
.Ic \&np
|
|
is specified.
|
|
The
|
|
.Ic \&op
|
|
string
|
|
may be specified with
|
|
.Ic \&ap
|
|
to allow any parity on input, but generate odd parity output.
|
|
Note: this only applies while getty is being run,
|
|
terminal driver limitations prevent a more complete
|
|
implementation.
|
|
.Xr getty 8
|
|
does not check parity of input characters in
|
|
.Dv RAW
|
|
mode.
|
|
.Pp
|
|
If
|
|
.Ic \&pp
|
|
string is specified and a Point to Point Protocol
|
|
.Pq Tn PPP
|
|
link bringup sequence is recognized,
|
|
.Xr getty 8
|
|
will invoke the program referenced by the
|
|
.Ic \&pp
|
|
string, e.g.\&
|
|
.Xr pppd 8 .
|
|
This can be used to handle incoming
|
|
.Tn PPP
|
|
calls.
|
|
.Sh SEE ALSO
|
|
.Xr login 1 ,
|
|
.Xr gethostname 3 ,
|
|
.Xr uname 3 ,
|
|
.Xr capfile 5 ,
|
|
.Xr ttys 5 ,
|
|
.Xr getty 8 ,
|
|
.Xr pppd 8 ,
|
|
.Xr telnetd 8
|
|
.Sh HISTORY
|
|
The
|
|
.Nm
|
|
file format appeared in
|
|
.Bx 4.2 .
|
|
.Sh BUGS
|
|
The special characters (erase, kill, etc.) are reset to system defaults
|
|
by
|
|
.Xr login 1 .
|
|
In
|
|
.Em all
|
|
cases,
|
|
.Ql #
|
|
or
|
|
.Ql ^H
|
|
typed in a login name will be treated as
|
|
an erase character, and
|
|
.Ql @
|
|
will be treated as a kill character.
|
|
.Pp
|
|
The delay stuff is a real crock.
|
|
Apart from its general lack of flexibility, some
|
|
of the delay algorithms are not implemented.
|
|
The terminal driver should support sane delay settings.
|
|
.Pp
|
|
The
|
|
.Ic \&he
|
|
capability is stupid.
|