[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: tip of the day: stop prevent 'man' from clearing the screen on exit



On Fri, Apr 11, 2003 at 08:55:18PM +0200, Vincent Lefevre wrote:
> On Fri, Apr 11, 2003 at 12:58:12 -0500, Dave Sherohman wrote:
> > Quite true.  It is also deficient in that it only affects less, not vi
> > and, essentially, every other app that uses curses.  So what's the better
> > solution, that fixes all curses apps and doesn't disable cursor keys?
> 
> Disable the alternate screen in the terminfo.

For those unfamiliar with terminfo terminology (since neither the
terminfo (3ncurses) nor the terminfo (5) man pages mention an
"alternate screen"), this means "remap the smcup and rmcup settings
in your terminfo entry to null strings".

For those unfamiliar with editing terminfo databases, do the
following:

$ mkdir ~/.terminfo
$ infocmp xterm > xterm.src
$ vi xterm.src
[Change rmcup and smcup entries to rmcup=, and smcup=,]
$ tic xterm.src -o ~/.terminfo/

To disable this behaviour system-wide, replace the last step with

# tic xterm.src

as root, but be aware that the next time you update your ncurses-base
package, your changed terminal definition will probably be
overwritten, undoing this change.  Much safer to put it in
~/.terminfo.

-- 
The freedoms that we enjoy presently are the most important victories of the
White Hats over the past several millennia, and it is vitally important that
we don't give them up now, only because we are frightened.
  - Eolake Stobblehouse (http://stobblehouse.com/text/battle.html)



Reply to: