Enable X11 forwarding from a server running Leopard OSX to other clients

From $1

Fixing the X11 forwarding issues on MacBook pro
An excellent tutorial on how to troubleshoot X11 forwarding issues from a mac server to another client is given at the URL  Leopard and X11
The steps required are:

1) Make sure no script sets the DISPLAY variable

Ensure that no script on the client is setting the DISPLAY variable ( see Leopard and X11 section ssh X forwarding debugging) to check this
Basic steps
Step 1 a

local $ echo $DISPLAY
/tmp/launch-Bh0fLm/:0

Step 1b

local $ grep DISPLAY ~/.*rc ~/.login ~/.*profile ~/.MacOSX/ environment.plist 2>/dev/null

Step 1c

local $ grep -r DISPLAY /opt/local/etc /sw/etc /etc 2>/dev/null



2) Ensure that X11 Forwarding is enabled in the server

After connecting with an ssh -X -Y remote-address . Perform the following steps

echo $DISPLAY

That should return something . In my case it returned nothing

So I checked the sshd config

remote $ grep X11 /etc/sshd_config ~/.ssh/* 
# X11Forwarding no
# X11DisplayOffset 10


I needed to edit the /etc/sshd_config where X11 forwarding was disabled and enable it there
i.e uncomment
X11Forwarding no
X11DisplayOffset 10


Then change it to a yes
X11Forwarding yes
X11DisplayOffset 10

Then you need to restart the ssh daemon( sshd ) by going to system preferences and Clicking the "Remote login " off and then on. And then you should have forwarding enabled
http://s3.amazonaws.com/code-itch/images/ssh_remote_login_restart.png

Tags:
 
Images (0)
 
Comments (0)
You must login to post a comment.