On Sun, 23 Jan 2011 06:11:03 Nuno J. Silva wrote:
> Mick <michaelkintz...@gmail.com> writes:
> > On Saturday 22 January 2011 05:45:27 Walter Dnes wrote:
> >>   As soon as some textmode applications in xterm stop, their output gets
> >> 
> >> wiped, and the xterm screen is restored to what it looked like before I
> >> launched the app.  Somebody thought they were being "helpful"; then
> >> again, so did the designers of "Clippy".  I don't know how many updates
> >> ago the behaviour changed, but here's what happens...
> > 
> > Hmm ... as far as I can recall with xterm/aterm this behaviour for some
> > commands is the expected/default behaviour.  I've looked into it for
> > things
> > 
> > like top et al when launched like so on the desktop from e.g. fluxbox's 
menu:
> >   aterm +sb -e top -d 2
> > 
> > Pressing q to quit top closes the aterm.  Completely.  :-(
> > 
> > I have not found a solution for it.
> > 
> > With xterm I would use the -hold option to stop xterm from collapsing like 
so:
> >   xterm -geometry 144x30 -bg black -fg green -hold -e 'ps auxf'
> > 
> > Thereafter I use the window decoration to close xterm, because no other
> > keyboard inputs are accepted by it.
> 
> I think the OP is talking about how some programs (ncurses-based and the
> like?) such as less output to a separate "layer" which is hidden when
> they terminate, instead of writing to the same "layer" where the shell
> lives (what would make the last output still visible when they end and
> control goes back to the shell.
> 
> But I have no idea how to change it - I know it works differently in
> some terminals, but I never tried to figure out how and why.


I know what the OP is after, and I remember doing it some time ago. A bit of 
hunting in my .bashrc & .bash_profile files shows this:

LESS="-R -X"
PAGER=/usr/bin/less

The "-X" is the important option, as it stops 'less' doing the terminal setup 
required for the oputput hiding.

It seems that the affected programs all check the 'PAGER' environment variable 
and run their output through 'less'.

Try just setting the 'LESS' environment variable from the command line and see 
it that helps. If it does, add it to .bashrc or .bash_profile to make it 
permanent.


-- 
Reverend Paul Colquhoun, ULC.    http://andor.dropbear.id.au/~paulcol
 Before you criticize someone, you should walk a mile in their shoes.
Then, when you do, you'll be a mile away, and you'll have their shoes.

Reply via email to