In contrast to this question I want the clearing of the screen re-enabled for less
. It works fine in my xterm
terminal under Cygwin/mintty or Gnome Terminal (both xterm
s).
However, when inside a screen
session, the clearing of the screen is somehow disabled. I tried several things, like
screen -T xterm
or putting the autonuke statement in my ~/.screenrc
. Also, inside the screen session
export TERM=xterm
tset
has no effect. So, now I'm out of ideas. Any help appreciated.
Answer
You probably want to avoid screen -T
or resetting TERM away from its default value while inside screen sessions (it should probably be screen
or at least something that starts with screen
).
Try putting the following line in your .screenrc
:
altscreen on
To activate it on a per-session basis, you can do Control+a:altscreen onReturn.
My manpage says:
altscreen on|off
If set to on, "alternate screen" support is enabled in virtual termi- nals, just like in xterm. Initial setting is `off'.
BTW, I have explained the root cause of the “screen clearing” (actually alternate/normal screen swapping) in another answer. It is possible that your screen
terminfo entry is missing smcup
/rmcup
or that your screen does not support alternate screens. Both of those seem less likely that altscreen
being off.
No comments:
Post a Comment