-1

I use XFCE and its built-in terminal on FreeBSD. When I view a man page and then quit it - by pressing Q - the contents of the man page stay in the terminal. In a GNOME terminal that doesn't happen: the man page's text is removed and you return to the previous stage before opening the man page with all the previously entered commands there. The same happens when I use vim. How can I make sure I get the same behavior on XFCE as well?

echo $TERM gives me xterm-256color and changing it to xterm - as it has been suggested here - doesn't solve my problem. I didn't find an option for "alternate screen" here either.

MatX
  • 11
  • 2
  • Related questions are https://unix.stackexchange.com/q/21707/5132 , https://unix.stackexchange.com/q/463102/5132 , https://unix.stackexchange.com/q/215377/5132 , https://unix.stackexchange.com/q/249665/5132 , and https://unix.stackexchange.com/q/336609/5132 . – JdeBP Jul 11 '20 at 22:32
  • Only partly. Since I have very limited experience with Unix, I needed a quick step-by-step how-to that lets me get on with my life. While the above give detailed description on the inner workings of terminals - which could be quite useful and interesting - I needed something simple. What solved my problem is what you can find in my answer that I already posted before you asked your question. But at any rate, thank you for your contribution as well. – MatX Jul 12 '20 at 16:04

1 Answers1

0

I was able to solve this by adding this line to .cshrc:

setenv TERM xterm-clear

And then I also had to make csh my default shell because sh didn't pick up changes from .shrc for some reason.

MatX
  • 11
  • 2
  • I may be stating the obvious, but the name `.cshrc` implies that these are settings for use by the `csh`. Other shells will never look into it as it may contain settings incompatible or unimplemented in these shells. If you type `echo $SHELL`, it should give you the shell you are currently using, and enable you to place settings in the appropriate config file. – AdminBee Jul 13 '20 at 08:34
  • Indeed, you're right. And like I alluded to it, sh was my default shell, and it didn't pick up what I put in the .shrc, so I had to set csh as a default shell. Again, what I needed was a "quick step-by-step how-to that lets me get on with my life" and definitely not taking every single possible shell and terminal combination into account and provide a lengthy discussion that applies to everything. – MatX Jul 13 '20 at 19:14