Macos – On Mac, mimic Windows (PuTTY and Xming) with XQuartz to connect to Linux server and display java GUIs

macosputtyxming

At University and on my home computer, I use a program called PuTTY to SSH connect to lcpu.bath.ac.uk (a linux server), and I use the program Xming to display visible elements, such as java and python GUIs and the like.

Basically I'm wondering what the process is to do this with XQuartz. When I try I get told I have no Display variable set, and I've googled for a while but I can't find a solution (most things also talk about X11, but I'm on Mountain Lion so the replacement is XQuartz).

This problem was solved on Windows by introducing Xming, so is there such a solution on Mac?

Thank you in advance!

Best Answer

If I remember correctly, you need to do:

$ ssh -X user@servername

And maybe this before the SSH:

$ xhost + servername

From the SSH man page

-X      Enables X11 forwarding.  This can also be specified on a per-host
         basis in a configuration file.
Related Question