On Mac, mimic Windows (PuTTY and Xming) with XQuartz to connect to Linux server and display java GUIs
10,363
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 videos on Youtube
Author by
Jamie
Updated on September 18, 2022Comments
-
Jamie over 1 year
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!
-
Admin over 11 yearsThank you for your quick response, but I've tried both of those in the past. I believe -x enables X11 forwarding, but there's nothing that will actually display it (I had the same problem on Windows, with nothing to display the GUI, until I installed and ran Xming before hand which now handles showing the GUI).
-
Admin over 11 years-x Disables X11 forwarding. X (uppercase, activates it). If you run those from X11 (or XQuartz) this should works.
-
Admin over 11 yearsAh, I did not realise there was a difference between the two. Thank you very much! Such a simple mistake. I feel quite silly with my previous comment now aha, thank you so much.