Operating systems provide a range of devices that are real terminals, or things pretending to be real terminals, attached via serial ports (and possibly modems). This package contains tools for running and managing TUI login services on real terminals. It also contains pre-written service bundles for such TUI login services.
Login on real terminals is done with ttylogin
services, configured to use those devices.
They are always alias names for other services, that are in turn named after the serial-line "getty" programs that they employ (such as getty
, mgetty
, and agetty
).
Such a TUI login service is a very simple service, which can be managed just like other ordinary services, started and stopped and enabled and disabled in the usual way.
There is one augmentation to ordinary service management: the preset
command uses the ordinary preset file mechanism, but can also read the /etc/ttys
file.
For FreeBSD, TrueOS, DragonFly BSD, and similar: the services are ttylogin@ttyu0
through to ttylogin@ttyuf
, matching the operating system's real terminal devices /dev/ttyu0
to /dev/ttyuf
.
These are aliases for getty@ttyu0
through to getty@ttyuf
.
These services invoke the FreeBSD /usr/libexec/getty
program, with the getty class of std.9600
.
The run
script for such services is basically this (using getty@ttyu1
as an example):
#!/bin/nosh setsid /usr/libexec/getty std.9600 ttyu1
For OpenBSD: the services are ttylogin@tty00
through to ttylogin@tty07
and ttylogin@ttyU0
through to ttylogin@ttyU3
, matching the operating system's real terminal devices /dev/tty00
to /dev/tty07
and /dev/ttyU0
to /dev/ttyU3
.
These are aliases for getty@tty00
through to getty@tty07
and getty@ttyU0
through to getty@ttyU3
.
These services invoke the OpenBSD /usr/libexec/getty
program, with the getty class of std.9600
.
The run
script for such services is basically this (using getty@tty03
as an example):
#!/bin/nosh setsid /usr/libexec/getty std.9600 tty03
For Linux: the services are ttylogin@ttyS0
through to ttylogin@ttyS3
, matching the operating system's real terminal devices /dev/ttyS0
to /dev/ttyS3
.
By default, these are aliases for agetty@ttyS0
through to agetty@ttyS3
.
But they can if one wishes instead be aliased to mgetty@ttyS0
through to mgetty@ttyS3
.
The first set of services invokes Wietse Venema's agetty
program.
The run
script for such services is basically this (using agetty@ttyS2
as an example):
#!/bin/nosh setsid agetty ttyS2
The second set of services invokes Gert Doering's mgetty
program.
The run
script for such services is basically this (using mgetty@ttyS0
as an example):
#!/bin/nosh mgetty ttyS0
Note that Florian La Roche's mingetty
program and Felix von Leitner's fgetty
program are not suitable for use with real terminals attached to serial devices.