Virtual terminal login

This package contains tools for running and managing TUI login services on both kernel and user-space virtual terminals. It also contains pre-written service bundles for such TUI login services.

What the service bundle run scripts look like

The run scripts are interpreted by nosh and are created from a template with the terminal name hardwired.

A run script to provide TUI login on kernel virtual terminal /dev/ttyv4 would be something like this:

#!/bin/nosh
setsid
vc-get-tty ttyv4
open-controlling-tty
vc-reset-tty
login-banner /etc/issue.vc
login

A run script for a service to provide TUI login on user-space virtual terminal /run/dev/vc1 would be something like:

#!/bin/nosh
setsid
vc-get-tty vc1/tty
open-controlling-tty
vc-reset-tty
login-banner /etc/issue.vc
login

Script composition and the toolset

The run scripts for these services use the chain loading tools to do what one would otherwise do with fgetty or mingetty. They are even more minimal than "minimal getty" is, and cut out much of the functionality of a full getty that is either invariant or non-existent on virtual terminals.

Several parts of this are specialized, hardwiring things that are variable in general, but that are in fact invariant for virtual terminals.

The chain login-banner /etc/issue login is a common sequence for login services. run scripts are recomposable and this chain is an example of that. One can adjust the behaviour of the service to suit particular needs by altering the tool chain or particular tool options. For examples:

There are some differences between user-space and kernel virtual terminals that simplify such scripts yet further: