On Fri, Nov 09, 2007 at 11:39:15AM -0500, 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.
While I didn't start using lbxproxy(1), the Low BandWidth X proxy, for this purpose, I've discovered quite by accident that it mostly solves this problem for me. I always use DISPLAY=:63 via starting a wm like lbxproxy & sleep 1; fvwm -display :63 & Now lbxproxy will be using the original $DISPLAY, and any screens from that window manager with DISPLAY=:63 will still be right even after starting another lbxproxy with a different $DISPLAY (providing the first lbxproxy is no longer running). The only drawback I've run across is that if you or anyone else is already lbxproxy running on the same system, it'll give you a higher port number that you'll only know about by scanning it's output (it's silent in the case of :63). This is rarely a problem for me, as the process normally goes away when I drop by connection. The only majoor annoyance I sometimes have is re-attaching to screens that have a DISPLAY set while not running X -- then I need to unset DISPLAY to avoid certain programs contacting an X server that's no there. _______________________________________________ screen-users mailing list screen-users@gnu.org http://lists.gnu.org/mailman/listinfo/screen-users