Connecting from Mac to Raspberry Pi’s remote desktop using X11

I play a lot with my Raspberry Pi PC. Usually I connect using Mac’s Terminal application via ssh to the Pi.

Sometimes though, I need to use the Pi’s full graphical desktop. For example I’m much more comfortable partitioning disks using gparted vs. any other command line tool.

So for those occasions I use an X11 window to connect from the Mac to the Pi, I use ssh to connect, and then run lxsession as the desktop on the Pi.

First, install X11 from XQuartz (http://www.xquartz.org).

Download the installer package disk image from the homepage. Open the disk image and run the installer package. The installation will take a few minutes and towards the end it will say there’s 1 minute left for quite a while 🙂

Once the installation is complete you must log out and log back in. If you don’t, the remote desktop won’t open. XQuartz is installed to Applications -> Utilities

Second, launch XQuartz then open XQuartz’s Terminal application (XQuartz menu -> Applications -> Terminal).

Third, connect to the Pi using ssh inside the XQuart’z Terminal. Then Enter ssh -X user@pi (replace user with your username on Pi, and pi with the name of your Pi).

Fourth, launch the Pi’s desktop. Enter lxsession. The Pi’s desktop should now be running on the Mac’s desktop.

Advertisements

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