Re: tty/pty/console wish

2007-06-06 Thread Bob Bagwill
On Tue, 05 Jun 2007 13:04:26 -0700, Matthew Dillon wrote:

> I think the last time I used screen was 20 years ago.  I just leave all my 
> xterms open.

I stop using screen when I got my VAXstation II/GPX running ULTRIX. :-)
Adios emacs!

But I don't like sitting in the machine room in the basement, with a linux
cluster deafening me with its turbojet fans, and cold air pouring down my neck,
so I've started using screen again.  And it's nice to be able to start something
at work, and resume it at home.


Re: tty/pty/console wish

2007-06-05 Thread Matthew Dillon
I will note one thing on remote sessions... if you are running through
NAT (network address translation), which is a very typical function of
today's cable modems, the NAT translation will often timeout if the
link stays idle too long.  This will cause the link to die when you
come back to it later on and try to type something.

The only way to deal with this is to adjust the TCP keepalive timers:

sysctl net.inet.tcp.always_keepalive=1
sysctl net.inet.tcp.keepidle=720
sysctl net.inet.tcp.keepintvl=75000

The numbers are in ticks.  The default, 720 (with hz = 100)
is 20 hours.  That is, an idle TCP connection is only tested
once every 20 hours by default.

The keepalive interval is how often it retries (up to a limit) after
the tcp connection has been idle for keepidle ticks.  The default is
around 12 minutes.  It retries a few times before giving up and
dropping the connection.

You would have to reduce  the idle interval down to something a lot
smaller to prevent the NAT session from timing out.  Something like
60 seconds or so (keepidle set to 6000 and keepintvl set to 6000.
YMMV.  Clearly not something one can do over a dialup or if running
a small server, but perhaps reasonable on a client.  The interval 
depends a lot on the NAT server and the connection load the NAT server
is handling.

-Matt


Re: tty/pty/console wish

2007-06-05 Thread Bill Hacker

Matthew Dillon wrote:

I think the last time I used screen was 20 years ago.  I just leave
all my xterms open.  Sometimes I have upwards of 30 windows open across
four virtual screens in X.  When people were describing the NATA bugs
I had an xterm open in an unsaved vi for over a week with all my notes
My version of Mac stickies!

I have about two dozen little FVWM2 buttons which run a remote ssh in
an xterm, and use -e none so the ssh doesn't interpret control escapes:

(Title Staid, Icon up, Back lightgreen, Action `Exec exec xterm -T TITLE -e ssh 
-a -e none HOSTNAME`)

-Matt


Ditto, OS X or Xfce4 on (another)BSD. Sometimes several weeks, and HKG to Zurich 
or IAD to ZRH or HKG as well.


OTOH, more recent ssh DO want to time out if inactive, which I have not yet had 
reason to try to alter, as it seems a good thing, actually.


'screen' had been of quite recent value though as the ZRH-HKG link had pretty 
high latency, and dying in the middle of a make world was not nice back when 
slower machines (or our lowball VIA Samuel 2's) took the better part of a day to 
complete it instead of an hour or two per chunk the dual-core's now deliver.


That said, there is an old 'wish for' w/r remote access that I would still like 
to see made a 'standardized option':


That of configuring a machine to be able to drop into an ssh-receptive mode - 
perhaps limited to only a preset correspondent - if/as/when it stalls in 
single-user mode and cannot go multi.


In theory, of course this is no longer 'single' user mode... but it would be a 
useful fiddle for maintenance of remote servers that do not have an IP KVM, 
expensive 'lights out' module, or site technicians who speak anything but 
Winders. IOW - most of them.


JM2CW,

Bill




Re: tty/pty/console wish

2007-06-05 Thread Matthew Dillon
I think the last time I used screen was 20 years ago.  I just leave
all my xterms open.  Sometimes I have upwards of 30 windows open across
four virtual screens in X.  When people were describing the NATA bugs
I had an xterm open in an unsaved vi for over a week with all my notes
My version of Mac stickies!

I have about two dozen little FVWM2 buttons which run a remote ssh in
an xterm, and use -e none so the ssh doesn't interpret control escapes:

(Title Staid, Icon up, Back lightgreen, Action `Exec exec xterm -T TITLE -e ssh 
-a -e none HOSTNAME`)

-Matt


Re: tty/pty/console wish

2007-06-04 Thread Jason Watson

On 6/4/07, Simon 'corecode' Schubert <[EMAIL PROTECTED]> wrote:


how about this:  use screen as your login shell



That works until you accidently ssh in and are having to hit ctrl-a,
a, a, d in order to log out -- and the number of ctrl-a and a keys
just gets longer and longer the more boxes you move through.

I have found putting "screen -ls" in some interactive part of your
shell start up does a pretty good job of reminding me to start screen
and letting me know which screens are already running. It is also a
good idea to name your screen sessions if you are going to do that.

If it is just one, long-running, non-interactive command you want to
run, using nohup might be good enough for most situations.

--
Signed,
Jason Watson


Re: tty/pty/console wish

2007-06-04 Thread Simon 'corecode' Schubert

Bob Bagwill wrote:

I never remember to launch screen or dtach before I start some long-
running job.  Wouldn't it be handy to be able to
- detach
- attach
- lock
- dup
- log
- snoop
- share
any tty, any time?  Or is there already an elegant way of doing it I 
haven't heard of?


That's actually not so trivial to do, unless you have an intermediate program 
translating the control codes for your attached terminal (unless you're talking 
not about any tty, but just about the virtual consoles)

how about this:  use screen as your login shell

cheers
 simon

--
Serve - BSD +++  RENT this banner advert  +++ASCII Ribbon   /"\
Work - Mac  +++  space for low €€€ NOW!1  +++  Campaign \ /
Party Enjoy Relax   |   http://dragonflybsd.org  Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz   Mail + News   / \



signature.asc
Description: OpenPGP digital signature


tty/pty/console wish

2007-06-04 Thread Bob Bagwill
I never remember to launch screen or dtach before I start some long-
running job.  Wouldn't it be handy to be able to
- detach
- attach
- lock
- dup
- log
- snoop
- share
any tty, any time?  Or is there already an elegant way of doing it I 
haven't heard of?

It's also be handy to be able to freely manipulate consoles across a 
cluster.