[Top][All Lists]

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

Re: screen and DISPLAY environment variable

From: address@hidden
Subject: Re: screen and DISPLAY environment variable
Date: Fri, 09 Nov 2007 18:06:47 +0100
User-agent: Mozilla-Thunderbird (X11/20070828)


You can probably use the 'at' command:
at * stuff "DISPLAY=:X.Y^M"

Or something like that.


Adam M wrote:
I'm a long-time screen user, but there's one thing that's been bothering
me for years that I've never found a good solution for.

My typical usage is I SSH from my Windows box to my Linux box using
PuTTY, get a shell, then launch screen. When you first create a screen
session, it inherits all its environment variables from the parent
shell. One of these variables is DISPLAY, which of course is used by X.

I frequently create many shell windows. Each of these windows has their
own shell that has its own copy of DISPLAY.

Now, the problem is when I close PuTTY and then later relaunch it and
reattach to the running screen session. When I open a new SSH connection
to my Linux box, that shell often has a different DISPLAY variable than
previously. Therefore, in order for X forwarding to work from within
screen, every single shell window (that needs X) must have its DISPLAY
variable updated appropriately.

This is really a pain, because I find myself closing and re-opening my
PuTTY multiple times per day. It would be nice if there was a way to
update all those shell windows with a single command so that DISPLAY
will be set properly on each.

Anyone have an idea for how to do this? I've been thinking about it for
a while and can't think of any good solution.


screen-users mailing list

reply via email to

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