[Top][All Lists]

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

Re: screen command creates new window instead of new instance.

From: Chris Jones
Subject: Re: screen command creates new window instead of new instance.
Date: Sat, 31 Jan 2009 08:28:01 -0500
User-agent: Mutt/1.5.13 (2006-08-11)

On Sat, Jan 31, 2009 at 07:42:38AM EST, Geraint Edwards wrote:
> Chris Jones <address@hidden> said
>               (on Fri, Jan 30, 2009 at 11:46:19PM -0500):
> > each time I ran "screen -c .screenrc-manual" from the
> > "child" xterm, it created an additional window in the "parent" screen
> > session instead of starting a new screen instance.
> This is expected behaviour.  In the screen manpage (under DESCRIPTION),
> the fifth paragraph says:
> <quote>
> In addition, new windows can be created by running a command like:
>               screen emacs prog.c
> from a shell prompt within a previously created window.
> </quote>
> And that is what you are experiencing.
> Because the xterm is a child of screen, it inherits the screen environment
> variables (STY and WINDOW), so when you run the screen command within that
> xterm, it senses (somewhat incorrectly, but you have fooled it) that it is
> within screen, and so creates a new window within the existing session.
> Personally, I don't see this as a bug, because screen wasn't really
> designed to spawn shells that ventured out of screen's control (such as
> those within an xterm).
> The workaround is simple - remove (unset) STY within the xterm shell.

It didn't click because while I knew that you could add new windows via
a "CTRL+A :screen", I didn't realize that issuing a "screen" command
from a bash prompt within a screen session did the same thing.

In other words, you don't need the intervening "child" xterm to
replicate this scenario.

What makes it somewhat confusing is that it looks like screen is
ignoring the "-c screenrc-manual" part of the command: if you use the
screen command within a screen session to create a new window, it does
not really make sense to specify a config file.

I had found it a little disturbing that the "screen" command did two
different things when used in a different context in the past but I
missed the implications.

Looks like this "ambiguity" was the cause of my "problem".

Thanks for taking the time to explain this.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]