Tag Archives: mac to linux tunnel

ssh -x Mac to Ubuntu with X11

Apparently I am too lazy to walk from one desk to another, so I wanted a way to graphically ssh from my macbook to a ubuntu unit. Having done this linux to linux before it pretty much works out of the box after you install openssh-server through the package manager. Next just type ‘username@ -X’ where the username is an account on the machine and IP is the IP of the host machine. The -X argument pipes the graphics from any application you load through to your client machine.

Mac os x doesn’t use the same graphics tools as linux, but you have an application that does, X11.app. so open up a terminal in os x and ssh -x to the host, enter your password. You should be at the user account home. Try a simple gui program such as xeyes or gedit. It should open up the X11 app which will in turn load your app from the host machine.

At the first try this did not work from the os x terminal, complaining about gtk errors. I opened up X11 standalone, and used its built in terminal. This worked fine, so I closed down X11, and tried with the os x terminal again and it worked. You may just need to open X11 once before trying this. Anyway, evidence….