Trying to open a GUI from a remote server using Mac but not successfully
Try the following on your Mac OSX system:
Enable X11 Forwarding with the “X11Forwarding yes” option set in /private/etc/sshd_config
for your SSH daemon's own local X11 host. This will allow the Mac OSX host to receive X11 client requests back from the remote machines (Linux) through ‘ssh‘ with the -X
option set.
Then restart sshd on the Mac OSX host:
Under System Preference / Sharing pane on Mac OS X. The SSH daemon should be running on the remote machine as well!
Related videos on Youtube
Jim
Updated on September 18, 2022Comments
-
Jim over 1 year
I'm brand new user in MacOSX. I'm using ssh to connect to some Linux servers. I'm trying to open a GUI locally for a process running in the remote Linux server.
So I read that I should install XQuartz which is used for the X11 in the Mac.
I installed it but when I try to start the GUI I get error that DISPLAY is not set.Indeed when I
echo DISPLAY
, nothing has been set. Am I supposed to set something manually?I also noticed that there is some command line as part of the XQuartz installation. Am I supposed to use only this command line? When I start it and
echo DISPLAY
I see just :0.0. How can I configure this?I tried
ssh -X
to connect and additionally I also checked out the X-11 FAQ According to this something overrides myDISPLAY
on the local machine. I suspect that TextMate which I installed previously does this, but I'm not sure how can I override it. What should I set? What is:/tmp/launch-Bh0fLm/:0
?-
Michael James almost 11 years:0.0 normally refers to the host graphics adapter. I
ssh
andssh -X
into my server at work (to ubuntu from ubuntu) and in both casesecho $DISPLAY
returnedlocalhost:10.0
. I do frequently launch gnome apps from remote machine via ssh command line. IMHO, investigate as much as you can about remove X sessions in Mac OSX. Sorry, I don't know more. -
Vihung over 7 yearsHave you tried using the
-Y
parameter for ssh. Thus,ssh -Y user@server
. Once connected, you should be able to launch your GUI app from the remote shell.
-
-
Jim almost 11 years
The SSH daemon should be running on the remote machine as well!
What do you mean?If I am connected viassh
to the remote machine then it should be already running, right? -
slm almost 11 years@Jim - yes that comment means what you said. It was only meant as a reminder, but given you're connecting to the Linux boxes it's moot.