1. In a plain SSH (terminal) window on the server, type:
Code: Select all
apt-get update
apt-get install ubuntu-desktop tightvncserver xfce4 xfce4-goodies
If the "apt install" step downloads very slowly, try hitting control-C to abort it, then re-run the command; sometimes, a slow mirror is chosen.
2. Start the VNC server with this command:
Code: Select all
tightvncserver -nolisten tcp :1
3. Paste in these commands to stop the running VNC server, instruct Ubuntu to start up XFCE when VNC runs, and start back up the VNC server:
Code: Select all
killall Xtightvnc
echo "startxfce4 &" >> /root/.vnc/xstartup
tightvncserver -nolisten tcp :1
5. Configure the system to not start the GUI on the default screen (the terminal that shows under the "VNC console" page). You want to be able to access it remotely instead.
Code: Select all
systemctl set-default multi-user.target
Note that we recommend against running desktop applications on a server, for performance, security, and stability reasons. As Ubuntu docs state, a web-based administration package is usually a better choice (or simply using the command-line directly).
Sources:
https://help.ubuntu.com/community/ServerGUI
https://help.ubuntu.com/community/VNC/Servers
https://askubuntu.com/questions/800302/ ... -16-04-lts