mirror of
https://github.com/st3fan/ewm.git
synced 2026-10-24 10:02:41 +00:00
Phase T3 of plans/20260719-04-apple1-telnet.md (added after T2): a --tty-banner <path> text file prints to the session before the machine says anything — where the operator puts the instructions a bare Woz Monitor prompt doesn't offer. Line endings are CRLF-normalized for raw terminals; a missing file fails loud at startup (a systemd misconfig should be visible in the journal, not silently banner-less). The flag is tty-session tooling, not machine description — it lives with --tty, outside the config document, like the debug flags do. scripts/systemd/banner.txt ships as the example (monitor and BASIC starters, the reset chord, how to leave telnet) and the service unit mounts it from /usr/local/share/ewm — readable under ProtectSystem=strict. Test: the banner precedes the machine's prompt, CRLF-normalized, and the flag without a value falls into usage. Verified live: piped session shows banner then prompt; a bad path exits 1 with the error. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
31 lines
1.1 KiB
Desktop File
31 lines
1.1 KiB
Desktop File
# One telnet connection = one Apple 1 (see ewm-one.socket). The
|
|
# emulator does no networking: systemd hands the accepted connection
|
|
# over as stdin/stdout and `ewm one --tty` speaks bytes — keyboard in,
|
|
# display out, Meta-R (or telnet's `send brk`) is the RESET button.
|
|
#
|
|
# The sandbox can be tight because the binary needs no filesystem at
|
|
# all: the machine configs and ROM images are embedded. Swap the
|
|
# --config for builtin:replica1 (or a config path, if you loosen the
|
|
# sandbox) to serve a different machine.
|
|
|
|
[Unit]
|
|
Description=Apple 1 for %i
|
|
|
|
[Service]
|
|
# Install banner.txt (next to these units) wherever you like — it is
|
|
# readable under ProtectSystem=strict from /usr or /etc.
|
|
ExecStart=/usr/local/bin/ewm one --config builtin:apple1 --tty --tty-banner /usr/local/share/ewm/banner.txt
|
|
StandardInput=socket
|
|
StandardOutput=socket
|
|
StandardError=journal
|
|
DynamicUser=yes
|
|
NoNewPrivileges=yes
|
|
ProtectSystem=strict
|
|
ProtectHome=yes
|
|
PrivateTmp=yes
|
|
PrivateDevices=yes
|
|
RestrictAddressFamilies=AF_UNIX
|
|
MemoryMax=64M
|
|
# Abandoned sessions do not get to keep a 1 MHz loop forever.
|
|
RuntimeMaxSec=4h
|