[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: Geraint Edwards
Subject: Re: screen command creates new window instead of new instance.
Date: Sat, 31 Jan 2009 12:42:38 +0000
User-agent: Mutt/

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:

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.

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.

Geraint A. Edwards (aka "Gedge")

reply via email to

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