I have an Ubuntu server (12.04 LTS) running remotely on a cloud hosting service. I have installed ubuntu-desktop
via apt-get
:
$ sudo apt-get install ubuntu-desktop
It appears to have installed no problem.
I have confirmed that /etc/ssh/ssh_config
on the server contains the lines
ForwardAgent yes
ForwardX11 yes
ForwardX11Trusted yes
and that /etc/ssh/sshd_config
on the server contains the line:
X11Forwarding yes
I then rebooted the server. It came back up no problem.
Now, starting X11.app on my Mac I am presented with an Xterm.
I connect to my server from this terminal using:
$ ssh -X <myhost>
and I connect to the server, no problem.
At this point I don't know what to do. I have tried
$ sudo startx
but I get a "no screens found" error.
I don't have screens because its a headless cloud server, but I just want to acces it from my Mac through X.
What now?
There are several methods to accomplished that, depending of what you really need to do.
In order to forward remote apps to local X environment, you need to install X11 on your Mac (you can find it at apple support site): http://support.apple.com/kb/DL1605?viewlocale=en_US&locale=en_US
From the X11 app, open the terminal, and then access the remote host with:
Then, when logged, simply run the command for the desired app, ex: firefox, nautilus, thunderbird, whatever...
You can even launch only the system (Ubuntu, Xubuntu, Mint, etc..) Main Menu, and interact with the remote system from there, without the need of a full graphical front-end. On a remote Linux Mint env, i simply run:
If you really need it, you can even start the remote graphical environment locally at your Mac's X11, simply running:
Better than any VNC, even better than an X11VNC connection! Secured and compressed connection FTW.
On your Mac, you'll need to install XQuartz, if you haven't done so already (see http://xquartz.macosforge.org). Once that's installed, reboot and open an XQuartz terminal window and SSH to your Ubuntu Server system:
If lightdm is running (see https://askubuntu.com/a/153423/66799 to read how turn it on and off as needed), run this command to get Ubuntu Unity tunnelled to your Mac over X11:
This works for me with Ubuntu Server 12.04 LTS and Mac OS X Mountain Lion 10.8.2, but I do get occasional Composiz errors. That said, I always got Composiz errors when running Ubuntu Desktop locally, too. (-:
You can log out of Unity to close the Ubuntu Desktop windows.
You have the right idea but the wrong syntax :)
startx
will not start over anssh
like that because it needs a screen (akaX
server to talk to)try this command to start the desktop gui
this will start the desktop environment.
disconnect.
and try
note did not test above line
If everything works fine you should see the ubuntu file manager popup. If not you may be missing some librarys or the syntax of the command is wrong (of the top of my head didn't try it).