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
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.
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.