Hi, Adam M wrote: [...] > 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.
I have setup my shell's .login to do something like this:
if [ -z "$DISPLAY" ] ; then
echo "Can't update X11 DISPLAY variable as \$DISPLAY is not set..."
else
echo "export DISPLAY=$DISPLAY" > ~/.x11
fi
and my precmd (executed each time a new prompt is being
displayed, bash uses something called prompt_command or similar
for this) looks similar to
if [ -f "$HOME/.x11" ] ; then
. ~/.x11
fi
(Well, in fact it's more complicated because it contains more
stuff, but that doesn't matter here ;-))
> Thanks,
> Adam
Ciao,
Thomas
--
Thomas Köhler Email: [EMAIL PROTECTED]
<>< WWW: http://gott-gehabt.de
IRC: tkoehler
PGP public key available from Homepage!
signature.asc
Description: Digital signature
_______________________________________________ screen-users mailing list [email protected] http://lists.gnu.org/mailman/listinfo/screen-users
