diff options
| author | tv <tv@krebsco.de> | 2026-11-21 15:45:58 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-21 15:45:58 +0000 |
| commit | 4148b4543c7d776d3428d01497cfc9de3ae7c9f7 (patch) | |
| tree | 2a82a076cffdd3904ecd293d122ab788b2b2289c /README.md | |
| parent | 4dd6ea85895430c1ef231c0f5ec1437bcb7ff0e9 (diff) | |
layers/console.nix: the console's size follows the terminal's
A serial line, unlike a pty, doesn't get told when the terminal's size
changes, so the console kept the size the run script saw at boot
(systemd.tty.rows/columns.ttyS0), e.g. 6 rows, from a tmux pane that
small for a moment, and a tmux attached there drew for that, whatever
the terminal's size. Now there's resize, which asks the terminal
(ESC[6n, after moving the cursor as far as it goes, then back) and sets
what it answers (stty rows, cols), and the shell on the serial console
runs it before each prompt, until the terminal doesn't answer (within a
second). A tmux attached there still keeps its size until attached
again.
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -92,6 +92,11 @@ of its own, import it into another layer: (As a layer of its own, it works, too: `--arg layers '[ layers/console.nix ]'`.) +A serial console doesn't get told when the terminal's size changes, so +the shell there asks the terminal before each prompt (`resize`, which +works in tmux, too). A tmux attached on the console keeps the size it +started with: detach and attach again after resizing. + Leave the guest with `reboot` (there, or via ssh, see below). The guest's store is read-only, and there's no nix, unless it has the |
