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

Re: Question about "screen"



* Alan Shutko (ats@acm.org) [010911 09:52]:
> Frederik Vanrenterghem <frederik@maui.kotnet.org> writes:
> 
> > I'm using screen on 1 machine with 2 windows, 1 of the windows is used to
> > ssh to another machine. Now I would like to start a new screen session on
> > that other machine, and be able to create new virtual windows in that
> > session (normally ctrl-a ctrl-c).
> 
> The problem is that the C-a you type is captured by the first screen,
> and not passed on.  Either set a different escape character on the
> second machine, or hit C-a twice, ie C-a C-a C-c.

Not exactly, as C-a C-a will perform screen's "other" command, meaning
switch back and forth between this window and the last. See when you do
'C-a ?' it tells you at the top 'Literal ^A: a'. So for the first screen
session to pass a ^A to the second screen session, you need to send it a
C-a a.

That means in order to create a new window on the "inner" screen
session, you're looking for
C-a a c
or
C-a a C-c

another option is to use a different meta character for the "inner"
screen. For instance, I often use ^A to get to the beginning of the line
and find it annoying as my screen command key. I find that ^Z works
better. I can start it with "screen -e ^Zz" or by specifying "escape
^Zz" in my ~.screenrc .

You could use this to assign different meta characters to nested
screens: use ^A for the "outer" screen, and start an "inner" screen with
'screen -e ^Zz' and then you can use ^Z to control the inner screen,
instead of having to deal with escaping C-a with C-a a.

-- 
Vineet                                   http://www.anti-dmca.org
Unauthorized use of this .sig may constitute violation of US law.
echo Qba\'g gernq ba zr\!             |tr 'a-zA-Z' 'n-za-mN-ZA-M'

Attachment: pgpce4QAnIZ43.pgp
Description: PGP signature


Reply to: