[Top][All Lists]

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

Re: screen + xterm scrollback

From: Phil!Gregory
Subject: Re: screen + xterm scrollback
Date: Tue, 20 Jul 2004 00:13:18 -0400
User-agent: Mutt/

* Zenaan Harkness <address@hidden> [2004-07-20 09:03 +1000]:
> termcapinfo xterm|xterms|xs|rxvt ti@:te@
> Which is all very well, but what I need is to figure out how to do key
> mapping properly, so that SHIFT+PgUp and SHIFT+PgDn do the
> scroll-half-page-[up|down] thing, for it to actually work the same as an
> xterm.
> And what should I put for scrollback buffers - should xterm and screen
> both have 5000 (or whatever) buffer, just xterm, or just screen?

* Zenaan Harkness <address@hidden> [2004-07-20 11:08 +1000]:
> with xterm, if I use less, it blanks the screen, and asks me to press a
> key to end. When I press a key, whatever was on the screen before
> returns, and the output from less disappears.
> Does someone know why this is?

These are related.  One capability that a terminal may have is an
"alternate screen".  xterm has it, and you have seen its effects--a
program will request the alternate screen, the terminal switches there,
and then it goes back to the normal screen, leaving all the text there
intact.  It is recommended that all full-screen apps use this, so as to
minimize their impact on any purely command-line stuff.  It makes sense,
for instance, for vi to use the alternate screen.  less probably does
because it's technically a full-screen app, but it's kind of annoying,
because using the alternate screen doesn't put things into the terminal's
main scrollback buffer.

My solution is to run everything in screen (heh) and use the termcapinfo
command above to disable the alternate screen.  Disabling the alternate
screen also has the side effect of putting stuff into xterm's scrollback
buffer, which is sometimes useful.

Not always, however, because if you scroll a little in screen, then change
screen windows and scroll a little more, xterm gets bits from both
windows.  For this reason, I keep a relatively short xterm scrollback
buffer (just enough for immediate "oh, what was that up there?") while
giving screen a big buffer.

I played a little while back with trying to use Shift-PgUp to go into
screen's scrollback instead of xterms, but it didn't really work because
the two programs take different approaches to how their scrollback buffers

-- contrarian of the first order... /
PGP: 026A27F2  print: D200 5BDB FC4B B24A 9248  9F7A 4322 2D22 026A 27F2
--- --
If a packet hits a pocket on a socket on a port,
And the bus is interrupted as a very last resort,
And the address of the memory makes your floppy disk abort, 
Then the socket packet pocket has an error to report!
---- --- --

reply via email to

[Prev in Thread] Current Thread [Next in Thread]