1 |
On Sun, 23 Jan 2011 06:11:03 Nuno J. Silva wrote: |
2 |
> Mick <michaelkintzios@×××××.com> writes: |
3 |
> > On Saturday 22 January 2011 05:45:27 Walter Dnes wrote: |
4 |
> >> As soon as some textmode applications in xterm stop, their output gets |
5 |
> >> |
6 |
> >> wiped, and the xterm screen is restored to what it looked like before I |
7 |
> >> launched the app. Somebody thought they were being "helpful"; then |
8 |
> >> again, so did the designers of "Clippy". I don't know how many updates |
9 |
> >> ago the behaviour changed, but here's what happens... |
10 |
> > |
11 |
> > Hmm ... as far as I can recall with xterm/aterm this behaviour for some |
12 |
> > commands is the expected/default behaviour. I've looked into it for |
13 |
> > things |
14 |
> > |
15 |
> > like top et al when launched like so on the desktop from e.g. fluxbox's |
16 |
menu: |
17 |
> > aterm +sb -e top -d 2 |
18 |
> > |
19 |
> > Pressing q to quit top closes the aterm. Completely. :-( |
20 |
> > |
21 |
> > I have not found a solution for it. |
22 |
> > |
23 |
> > With xterm I would use the -hold option to stop xterm from collapsing like |
24 |
so: |
25 |
> > xterm -geometry 144x30 -bg black -fg green -hold -e 'ps auxf' |
26 |
> > |
27 |
> > Thereafter I use the window decoration to close xterm, because no other |
28 |
> > keyboard inputs are accepted by it. |
29 |
> |
30 |
> I think the OP is talking about how some programs (ncurses-based and the |
31 |
> like?) such as less output to a separate "layer" which is hidden when |
32 |
> they terminate, instead of writing to the same "layer" where the shell |
33 |
> lives (what would make the last output still visible when they end and |
34 |
> control goes back to the shell. |
35 |
> |
36 |
> But I have no idea how to change it - I know it works differently in |
37 |
> some terminals, but I never tried to figure out how and why. |
38 |
|
39 |
|
40 |
I know what the OP is after, and I remember doing it some time ago. A bit of |
41 |
hunting in my .bashrc & .bash_profile files shows this: |
42 |
|
43 |
LESS="-R -X" |
44 |
PAGER=/usr/bin/less |
45 |
|
46 |
The "-X" is the important option, as it stops 'less' doing the terminal setup |
47 |
required for the oputput hiding. |
48 |
|
49 |
It seems that the affected programs all check the 'PAGER' environment variable |
50 |
and run their output through 'less'. |
51 |
|
52 |
Try just setting the 'LESS' environment variable from the command line and see |
53 |
it that helps. If it does, add it to .bashrc or .bash_profile to make it |
54 |
permanent. |
55 |
|
56 |
|
57 |
-- |
58 |
Reverend Paul Colquhoun, ULC. http://andor.dropbear.id.au/~paulcol |
59 |
Before you criticize someone, you should walk a mile in their shoes. |
60 |
Then, when you do, you'll be a mile away, and you'll have their shoes. |