Reset the terminal before opening the LXC shell
Write ESC c, the sequence `reset` sends, inside suspend() right before ssh. The container shell then starts on a clean screen with no leftover TUI terminal modes. It runs locally, so the container does not need `reset` installed and `pct enter` is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
40feb125b4
commit
cccdaf7209
3 files changed
+26
No files matched your search
@@ -210,6 +210,10 @@ root's `authorized_keys` (verified: `ssh -o BatchMode=yes root@mainframe pct sta
|
||||
- Exit 255 (ssh itself failed) -> error notify naming the guest and the code. Other
|
||||
exit codes are the container shell's last status (`exit` after a failed command
|
||||
gives 1) and are not errors.
|
||||
- Inside `suspend()`, right before ssh, the terminal gets a full reset (`ESC c`, what
|
||||
`reset` sends) so the container shell starts on a clean screen without leftover TUI
|
||||
terminal modes (user request). Done locally, not in the container: no dependency on
|
||||
`reset` existing there, and `pct enter` stays unchanged.
|
||||
- `OSError` from `subprocess.run` is caught *inside* the `suspend()` block: Textual
|
||||
8.2.8's `suspend()` has no try/finally, so an exception escaping it leaves the app
|
||||
suspended.
|
||||
|
||||
Reference in new issue
Block a user