How to install Ubuntu with GUI

Posted October 12, 2016 75.8k views
Linux BasicsUbuntu 16.04

Hi - Can someone help me setup a GUI on a fresh Ubuntu 16.04 server? I’ve taken the following steps:

1) Setup droplet
2) sudo apt-get update
3) sudo apt-get install ubuntu-desktop
4) sudo apt-get install ubuntu-gnome-desktop
5) sudo apt-get install gnome-core
6) reboot

I re-ssh into the server but the GUI does not appear. So I run ‘startx’ and I get the following message:

X.Org X Server 1.18.4
Release Date: 2016-07-19
X Protocol Version 11, Revision 0
Build Operating System: Linux 3.13.0-95-generic x8664 Ubuntu
Current Operating System: Linux tinzors 4.4.0-38-generic #57-Ubuntu SMP Tue Sep 6 15:42:33 UTC 2016 x86
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.4.0-38-generic root=UUID=d39864c2-d249-4a0c-b885-5c72ef360b3f ro console=tty1 root=LABEL=DOROOT notsc clocksource=kvm-clock net.ifnames=0
Build Date: 14 September 2016 03:33:24PM
xorg-server 2:1.18.4-0ubuntu0.1 (For technical support please see
Current version of pixman: 0.33.6
Before reporting problems, check
to make sure that you have the latest version.
Markers: (–) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: “/var/log/Xorg.1.log”, Time: Wed Oct 12 18:15:28 2016
(==) Using system config directory “/usr/share/X11/xorg.conf.d”

Can someone help?

Thanks in advance!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
6 answers

Hi @jtn1490 ,
You can’t just SSH into server and type startx to get Ubuntu with GUI.
You should use X11 Forwarding or VNC to get what you want.

First solution will not get you a full GUI, but you when you launch any GUI app, it will forward it to you.
Second solution will get you full GUI, so you can go with it.

How to enable X11 Forwarding
To use it, it needs to be enabled on server-side. Open SSH config,

  • sudo nano /etc/ssh/sshd_config

and try to locate X11Forwarding line.
You need to make sure it is not commented (there is no # on beginning of line), and it is set to yes.
Basicly, it should look like

X11Forwarding yes

Now you can try to SSH with following command:

  • ssh -X your-user@droplet_IP

It will show you normal prompt, but if you try to run any GUI app (e.g. libreoffice).
You will see apps GUI just like when you run on your local machine.

Problems troubleshooting:
If you get into any problem while SSH-ing, make sure you have installed xauth on your local machine!

How to install and configure VNC
How to Install and Configure VNC on Ubuntu 16.04 should help you learn more about it and how to install. With this solution, you are getting full GUI, just like on normal machine.

If you get into any problem, feel free to ask :)

by finid
In this guide, we will be setting up VNC on a Ubuntu 16.04 server and connecting to it securely through an SSH tunnel. The VNC server we will be using is TightVNC, a fast and lightweight remote control package. This choice will ensure that our VNC connection will be smooth and stable even on slower internet connections.

Hi - I followed the ‘How to install and configure VNC’ guide verbatim. However, in Step3 - Testing the VNC Desktop, I keep getting the error “The connection was refused by the host computer”. I am using VNC Viewer. I typed in the same IP address that I SSH into (which works).. Do you know what might be going on?


I followed Ubuntu Remote Desktop On Digital Ocean but I’m getting the bellow response when trying to connect through RDP: Reconnection in progress. Attempt 1 of 20.... and it keeps on going.
Remmina debug window shows the below:

RDP][] reconnection successful.
[RDP][] network disconnection detected, initiating reconnection attempt
[RDP][] attempting reconnection, attempt #1 of 20
Channel cliprdr has been closed

Hi guys, i’m having the same problem the others posted above.
Did anyone got it solved?

Check out this post by Jerry Gamblin …
Ubuntu Remote Desktop On Digital Ocean

I am having exactly the same error as @jtn1490 - any help from @xmudrii?