less, screen, vi driving you nuts?
Moving from FreeBSD to Linux, another issue that came up is that apparently Linux’s default terminal information allows the use of the “alternate screen buffer” from vt102 or some such thing. This is what causes less and vi to clear the screen when you exit, screen to not allow you to use xterm’s scrollback buffer, and other such anti-user things that really ought to be disabled by default. (Hell if I wanted that enabled, I’d just run the programs in their own xterm, so when I exit they just disappear completely).
The solution that works for me can be found here:
Exorcising the Evil Alternate Screen
Specifically, I added the line to .Xdefaults, and ran xrdb as specified, and that took care of it. The terminfo stuff at the end of the page didn’t work, but that might just be because I’m using Debian instead of another distro (maybe some look in $HOME/terminfo by default, who knows).