2
Background
I have a bash_profile statement that dynamically sets my display variable (Im on wifi most the time) for when i need to run a few x windows programs off of our servers.
if [ ! $DISPLAY ] ; then
if [ "$SSH_CLIENT" ] ; then
export DISPLAY=`echo $SSH_CLIENT|cut -f1 -d\ `:0.0
echo "The display variable has been set to:"$DISPLAY
fi
fi
Problem
My problem is, lets say i open putty and ssh into sapserver1. My display variable is set correctly. However!
If i then ssh from sapserver1 into sapserver2 my display variable on sapserver2 gets set to that of sapserver1.
Question
Is there a way to forward or mask the connecting IP address of my workstation no matter how many times I ssh into boxes. Either that, or a way to pass the display variable through.
We do have x11 forwarding enabled. however my script above doesn't seem to set the variable when i login initially. It only sets is when i ssh in from my original server. – gorelative – 2013-01-17T17:56:25.557