Hello I am working on a raspberry pi with Raspian version 10 (buster), and I recently installed GNU Screen version 4.06.02. When I used to look at files with less, the contents would appear on what seemed like a different screen, so that when I exited out with 'q' I would return to my base terminal view. Now when I use less with screen it works like a weird cat command, showing my base terminal and the contents of the file underneath. When I fully close the terminal and SSH back into my pi, less works like normal. I haven't been able to find anybody with the same issue, and I don't even know where to start looking in order to fix this, any help would be appreciated.
The setting you're probably looking for is
altscreen. This is an optional feature (not all physical terminals support it).
This can be turned on by adding the line
altscreen on in
$HOME/.screenrc. Now when
screen starts up it will enable the behavior you want.
In the current session you can to Control a
:altscreen on to enable it immediately.