Tunnel X over SSH

October 14th, 2006 at 23:41 · Filed Under Call Me a Geek, Computing, Hacking, Linux, Mac OS X 

The drawback of Remote Desktop Login I posted 2 days ago is its slow speed. It takes a while to display the desktop login screen. Another drawback is it creates another X session at the server if you already have another running.

My laziness and desire to start up applications and finish the job quickly makes me look further into the world of remote access. This leads me to X tunneling over SSH.

With X tunneling over SSH, I am able to run X applications (Linux FC5) on my preferred Mac OS X desktop, Pluto. The screenshot shows that I am running KDE Control Center (Linux FC5 on triton1) on Pluto (Mac OS X).

This is how I do it:

  1. ForwardX11 needs to be enable. Edit /etc/ssh/ssh_config. Make sure you have ForwardX11Trusted yes is enabled in ssh_config.
  2. On Mac OS X, start X11. At terminal, type
    $ ssh -X username@ip_address
    
  3. Start any X applications you like.

Comments

8 Responses to “Tunnel X over SSH”

  • Amanda Rosenberg on January 6th, 2007 17:53 1

    Hi Adrian,

    Thanks for the excellent tips.

  • Tunnel X from Gutsy to Leopard on April 4th, 2008 22:08 2

    [...] have been tunneling X from Linux to Tiger for almost two years without any problems and happy with it. After upgrading to [...]

  • saurabh Raguvanshi on May 22nd, 2008 17:05 3

    Although I can open individual applications via ssh, but I am not able to get the complete desktop of my solaris server. Any tips on that.

  • Adrian Hoe on May 22nd, 2008 22:18 4
  • Jonathan Collins on May 25th, 2008 18:57 5

    Thanks again Adrian.

    I am able to SSH into the SGI in my lab. Wonderful!

    Jon C.

  • saurabh Raguvanshi on May 30th, 2008 21:07 6

    Hello Adrian,
    I tried using Xnest to get solaris desktop. Well it took me some time to figure out that leopard does not have Xnest bundled with it. So I got it and tried.. but now I am getting following error. Do you thikk you can help me on this?

    Couldn’t open RGB_DB ‘/usr/X11R6/lib/X11/rgb’
    error opening security policy file /usr/X11R6/lib/X11/xserver/SecurityPolicy
    Couldn’t get keyboard.
    Could not init font path element /usr/X11R6/lib/X11/fonts/CID/, removing from list!

  • Adrian Hoe on May 31st, 2008 7:45 7

    Leopard has a very different or I shall say a revamped X11. Some X11 applications, e.g. GIMP, no longer works on Leopard.

    If you are using Gnome, then you can follow the instruction here:

    http://adrianhoe.com/adrianhoe/2008/04/04/tunnel-x-from-gutsy-to-leopard/

    I hope this helps.

  • tkonen on July 16th, 2008 15:41 8

    Hi Adrian,

    Thanks for the tips.

Leave a Reply