getty(1M) getty(1M)
NAME
getty - set terminal type, modes, speed, and line discipline
SYNOPSIS
timeout] line [speed [type [linedesc]]]
file
DESCRIPTION
The program is invoked by (see init(1M)), as the second process in the series, > > > shell, that ultimately connects a user with the HP-UX
system.
sets the terminal speed and characteristics and prompts for the user's login information before passing control to the program. See below
for details.
Options
recognizes the following options:
Scan and test file for conformance with the specifications in the gettydefs(4) manpage, print the results on standard output, and
terminate. All other arguments are ignored.
Any unrecognized modes or improperly constructed entries are reported as errors. For correct entries, prints out the
values of the various flags. See ioctl(2) for an interpretation of values. Note that some values are added to the
flags automatically.
Get the settings for special control characters from the
file. See the section.
Do not force a hangup on the line before setting the speed.
By default, forces a hangup on the line by setting the speed to zero before setting the speed to the default or spec-
ified speed. However, when is run on a direct port, does not force a hangup on the line since the driver ignores
changes to zero speed on ports open in direct mode (see modem(7)).
Exit if the open on the line succeeds
and no one types anything within timeout seconds. The default is to wait indefinitely.
Operands
recognizes the following operands:
line The name of a tty device file in to which is to attach itself. opens file for reading and writing.
speed A label for a speed and tty definition in the file See gettydefs(4).
This definition tells at what speed to run initially, what the login message should look like, what the initial tty
settings are, and what speed to try next if the user indicates that the speed is inappropriate by typing a break
character. The default speed is the first entry in or 300 baud if is missing or unusable.
type A character string describing what type of terminal is connected to the line in question. understands the following
types:
none Default
c100 Concept 100
hp45 Hewlett-Packard HP2645
vt61 DEC vt61
vt100 DEC vt100
The default terminal is that is, any CRT or normal terminal unknown to the system. Also, for terminal type to have
any meaning, the virtual terminal handlers must be compiled into the operating system. They are available, but not
compiled, in the default condition.
linedesc A character string describing which line discipline to use when communicating with the terminal. Hooks for line dis-
ciplines are available in the operating system, but there is only one presently available: the default line disci-
pline,
Operation
With the option, tests file against the rules for (see gettydefs(4)), prints error messages and flag values to standard output, and termi-
nates.
This is a good way to test a revised file before putting it into operation.
Without the option, opens the port interface for line, sets the speed, terminal parameters, and login message, prompts for login informa-
tion, and passes control to the program, as follows.
1. determines the speed, terminal parameters, and login message.
o If the speed operand is given, selects that entry from and sets the terminal parameters and login message to the given values.
o If speed is not found in or the speed operand is omitted, selects the first entry from and sets the terminal parameters and login
message to the given values.
o If is missing or unreadable or has errors, sets the speed of the interface to 300 baud, sets the login message to and sets the
terminal parameters to: use raw mode (awaken on every character), suppress echo, allow either parity, convert newline characters
to carriage-return-linefeed, and perform tab expansion on standard output,
o If type or linedesc is given, the terminal parameters are adjusted appropriately.
o The special control characters are defined. If the option is given, they are read from the file. See the section for detail.
o connects to the terminal port, applying all the terminal parameters. It forces a hangup on the line by setting the speed to
zero, except if the port is opened in direct mode or if the option was specified.
2. prompts for and reads a line of login information.
o If the file exists, it is displayed.
o The login message is displayed.
o reads the user name and optional arguments from the port. The one-line parsed input is limited to 255 characters and 64 white-
space-delimited words. The special control characters affect the input. See the section for detail.
If a null character or a framing error is received, it is assumed to be the result of the user pushing the break key. This
causes to attempt the next speed in the current series, repeating step 1.
The input line is terminated with a newline or carriage return character. If the latter, the system is set to receive carriage
returns appropriately (see termio(7)).
The user's name is scanned to see if it contains any lowercase alphabetic characters. If it does not, and if the name is
nonempty, the system is told to map any future uppercase characters into the corresponding lowercase characters.
3. passes control to
o passes the parsed user name and optional arguments, along with the terminal parameters, to the program (see exec(2)).
o performs user validation (for example, password processing) and login retries, places the optional arguments in environment vari-
ables, and passes control to the shell. See login(1) for details.
4. On termination, control returns to
o When or or the shell terminate for any reason, control reverts to
o If the action is defined for the device file in reruns the command, and the process resumes at step 1 (see inittab(4)).
Special Control Characters
The program uses special control characters to manage text input and to switch line speeds.
The default special control characters are shown in the following table.
Table 1: Default Special Control Characters
--------------------------------------------------------------------------
May Be Character, or ASCII Value
Name Quoted (ASCII Name; Key Names) Action
--------------------------------------------------------------------------
eof Yes ^D (EOT) Terminate getty
erase Yes # Erase previous character
intr No 127 (DEL; Delete) Erase entire input line
kill Yes @ Erase entire input line
quit No ^ (FS) Terminate getty
--------------------------------------------------------------------------
break No (NUL or framing error) Switch to next entry
lineend No ^J (NL; newline) Terminate input line
lineend No ^M (CR; carriage return) Terminate input line
quote Yes Quote next character
--------------------------------------------------------------------------
You can set different values for and some other terminal parameters by modifying the file. A superuser may view and modify with the com-
mand. See stty(1) for details.
To use the values in specify the option on the command line. understands the single character quoting convention using the backslash
quote. This allows you to include whitespace, some of the special control characters, and some of the general control characters, in the
input line as ordinary text. You cannot quote the current values of the special control character names that are marked "No" in the May Be
Quoted column. The single and double quotation marks and ) have no special meaning (unless they are assigned in
DEPENDENCIES
HP2334 MultiMux
The modem control parameter must be present in the file when using in conjunction with an HP2334 or HP2335 MultiMux to ensure that the RTS
modem control signal is asserted correctly.
Example:
is not intended for use with devices other than the HP2334 or HP2335 MultiMux.
FILES
SEE ALSO
ct(1), login(1), stty(1), init(1M), ioctl(2), gettydefs(4), inittab(4), modem(7), termio(7).
getty(1M)