Some terminal applications (e.g. mosh
) use the terminal in the alternate screen, thereby disabling the terminal emulator's local scrolling. mosh
does not allow overriding its terminal settings (as far as I could find), so one simple way to force it to not use the alternate screen and (thus) keep local scrolling working is to tell it the terminal doesn't have an alternate screen:
env TERM=dumb mosh <destination>
mosh
now no longer breaks scrolling, unfortunately TERM=dumb
also doesn't have any other modern-ish terminal features, such as setting the application name in the titlebar. More useful is TERM=linux
, but that still doesn't set the app name in the titlebar.
So, what is the most xterm-like $TERM
setting that does not support an alternate screen?
notes:
‑ My default TERM
value is xterm-256color
.
‑ I realise there are other workarounds, like using tmux
inside mosh
, but sometimes I don't want to do that.
‑ I realize this only gives me the local scroll buffer, so this still misses output if the mosh session was disconnected and then reconnected itself. But sometimes that is good enough.