X11 Forwarding on OS X 10.8.2 – Mountain Lion

January 8, 2013 at 10:41 am | Posted in OS X (Mac) | 5 Comments
Tags: , , , , ,

To get X11 forwarding to work on Mac OS X 10.8.2, you first need to install the XQuarz X window system, which seems to have been omitted in this release of OS X.

After downloading the XQuarz package, simply install it by double clicking the package icon. After the package is installed, you need to log out and back into your OS X machine.

Add your remove server to host:

On your Mac in iTerm:

$ sudo xhost + remote.server.name

Connect to your remote system with ssh:

On your Mac in iTerm:

$ ssh -X username@remote.server.name

Test X11 by running xclock or another GUI application like gcalctool.

On remote server:

$ xclock

Note when upgrading to Mavericks

After the upgrade to Mavericks, my xhosts settings were reset, and X11 forwarding no longer worked. This fix this you simply need to re-run the xhost command:

$ sudo xhost + remote.server.name

 

Advertisements

5 Comments »

RSS feed for comments on this post. TrackBack URI

  1. Hey Christoph,

    Thanks for posting this update here. this was a great help for me. Since I updated to OS X 10.8 and x11 was omitted, I needed this application to remotely run monitoring tools (export / forward displays) from some other Linux servers. FYI. Some people should be aware that the app won’t authenticate remotely if do not have security enable on the x11 security preferences.

    Best Regards,

    Guillermo

  2. This was a very helpful post. I could not get X11 forwarding working on my shiny new retina laptop, as all the other posts focused only /etc/sshd_config settings, and none mentions OSX no longer ships with X11. My error was “x11 forwarding request failed on channel 0”. Thanks again.

  3. thank you. Explanation is simple and very clear.

  4. I had to `apt-get install xauth` on the remote Ubuntu server I was trying to forward from (even though xeyes and X11 was installed, xauth was not).


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.
Entries and comments feeds.

%d bloggers like this: