Re: [gentoo-user] How can I turn off xterm console restore?

2011-01-25 Thread Walter Dnes
On Mon, Jan 24, 2011 at 10:37:41PM +, Mick wrote

> Excellent solution for the OP's question, but what can you do to stop
> the terminal collapsing completely, when it is launched to just run
> a command that exits after it runs?

  Once I realized that my problem was an xterm option, not a system
setting, I plowed through "man xterm".  You can include "-hold" on the
xterm command line, or use the "hold" xresource option to do freeze
rather than destroy the terminal on exit.

-- 
Walter Dnes 



Re: [gentoo-user] How can I turn off xterm console restore?

2011-01-25 Thread Walter Dnes
On Mon, Jan 24, 2011 at 12:56:02PM -0800, Bill Longman wrote

> You can always call it back up. The other window, that is. Just
> Ctrl-middle-click the xterm and choose "Show alternate screen".
> 
> Presto.
> 
> It's saved my bacon more than once

  Yes that works.  There's an even better option listed when I middle-
click.  The option "Enable Alternate Screen Switching" is checked by
default on my system.  Unchecking it disables alternate screen
switching, which does what I was asking for.  Thanks for pointing me in
the right direction.

  The ultimate solution is to make this a default.  Once I realized this
was an xterm setting, I plowed through "man xterm" and discovered...

> titeInhibit (class TiteInhibit)
> Specifies whether or not xterm should remove ti and te termcap
> entries (used to switch between alternate screens on startup of
> many screen-oriented programs) from  the  TERMCAP string.   If
> set,  xterm  also  ignores the escape sequence to switch to the
> alternate screen.

  A Google search found
http://www.linux.org/docs/ldp/howto/XWindow-User-HOWTO/moreconfig.html
which includes the ~/.Xdefaults incantation...

 ! Do not clear the screen after the program exits
 XTerm*VT100*titeInhibit: true


-- 
Walter Dnes 



Re: [gentoo-user] How can I turn off xterm console restore?

2011-01-24 Thread Mick
On Monday 24 January 2011 20:56:02 Bill Longman wrote:

> You can always call it back up. The other window, that is. Just
> Ctrl-middle-click the xterm and choose "Show alternate screen".
> 
> Presto.
> 
> It's saved my bacon more than once
> 
> Bill

Yes!  I had forgotten about that! Thanks Bill.  :-)

Excellent solution for the OP's question, but what can you do to stop the 
terminal collapsing completely, when it is launched to just run a command that 
exits after it runs?
-- 
Regards,
Mick


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] How can I turn off xterm console restore?

2011-01-24 Thread Bill Longman
On 01/21/2011 09:45 PM, 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...
> 
>   Let's say I'm having a problem with packet loss to/from a certain
> internet server.  I would run "mtr" which gives an ongoing enhanced
> traceroute display.  When it gets to the router that's dropping packets
> I would hit "Q" and mtr quits.
> 
> Before the update
> =
>   I would copy/paste the mtr output into an email, and send it off to
> whomever, with the output showing the packet-loss stats.
> 
> After the update
> 
>   As soon as mtr quits, its output gets wiped, and the xterm screen is
> restored to the state it was in before mtr was launched... helpful NOT!
> 
>   I've discovered that I can suspend it with {CTRL-S}, but I shouldn't
> have to resort to that.  Using Google, I found references to
> "man termcap", which stated that this behaviour was controlled by
> entries in /etc/termcap.  Despite the fact that I have the termcap man
> page on my system, I do *NOT* have /etc/termcap.  Does anyone have a
> sample /etc/termcap (or will ~/.termcap work?) to stop the screen
> restore after a text application quits?
> 

Walter,

You can always call it back up. The other window, that is. Just
Ctrl-middle-click the xterm and choose "Show alternate screen".

Presto.

It's saved my bacon more than once

Bill



Re: [gentoo-user] How can I turn off xterm console restore?

2011-01-22 Thread Mick
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.


>   Let's say I'm having a problem with packet loss to/from a certain
> internet server.  I would run "mtr" which gives an ongoing enhanced
> traceroute display.  When it gets to the router that's dropping packets
> I would hit "Q" and mtr quits.

That's how it always worked here.


> Before the update
> =
>   I would copy/paste the mtr output into an email, and send it off to
> whomever, with the output showing the packet-loss stats.

Are you sure you were not previously using the -r option to report the output 
on the screen and now you don't?


> After the update
> 
>   As soon as mtr quits, its output gets wiped, and the xterm screen is
> restored to the state it was in before mtr was launched... helpful NOT!

try this:

  mtr -c 3 -r 123.456.78.90

>   I've discovered that I can suspend it with {CTRL-S}, but I shouldn't
> have to resort to that.  Using Google, I found references to
> "man termcap", which stated that this behaviour was controlled by
> entries in /etc/termcap.  Despite the fact that I have the termcap man
> page on my system, I do *NOT* have /etc/termcap.  Does anyone have a
> sample /etc/termcap (or will ~/.termcap work?) to stop the screen
> restore after a text application quits?

I don't have /etc/termcap here ... and wouldn't know how to use it to be 
honest.
-- 
Regards,
Mick


signature.asc
Description: This is a digitally signed message part.