Report this

What is the reason for this report?

How to install graphical interface?

Posted on February 18, 2017

So what I am trying to achieve is to be able to access a desktop enviorement on Ubuntu 16.04 with TightVNC.

I have done the following steps already:

sudo apt-get install update
sudo apt-get install upgrade
sudo apt-get install ubuntu-desktop
sudo apt-get install xfce4
sudo apt-get install xfce4-goodies
sudo apt-get install tightvncserver

It also asked me more times that the installations are corrupted so I fixed them with with the command it has written, I think it was something like “sudo-apt get install -i something”. Unless I did this, it did not allow me to install other programs, so I fixed it with this.

I have also put in the command “vncserver” and have choosen a password.

I have rebooted the Droplet.

When I tried to log in with TightVNC to my droplets ip address : the default port of TightVNC I only saw a gray screen.

I have searched for tutorials, solutions on the internet on how to fix this, I have only seen the same steps on how to set this up.

Please explain it very simple, as I am kind of a newbie to Linux, although I have been using it for quite some time without actually reading or watching a Linux tutorial, and I’ve always had issues like this.

So if you were able to help I would be really thankful. Thank you.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

Have a look at this tutorial: https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-vnc-on-ubuntu-16-04 Otherwise this thread might help you: https://www.digitalocean.com/community/questions/how-to-install-ubuntu-with-gui You might want to reset you droplet, so the changes you’ve tried doesn’t conflict with anything else.

Hello, @codepoetry123

Have you tried using another client different from tightvnc? You can use RealVNC, VNC Viewer or Remmina as well.

If you’re still getting a blank/gray screen you can do this. Add the following snippet to the xstartup which is mentioned in step 1 - /home/sammy/.vnc/xstartup and try again.

https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-vnc-on-ubuntu-18-04

#!/bin/sh
 unset SESSION_MANAGER
 unset DBUS_SESSION_BUS_ADDRESS
 dbus-launch xfce4-session

Hope that this helps! Regards, Alex

You need to configure TightVNC to use the desktop environment you installed (XFCE). Here’s a step-by-step guide to achieve this:

Step-by-Step Guide

  1. Install Necessary Packages: You’ve already done this, but let’s summarize:
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install ubuntu-desktop -y
sudo apt-get install xfce4 xfce4-goodies -y
sudo apt-get install tightvncserver -y
  1. Configure TightVNC: Start the VNC server to create the initial configuration files:
vncserver
  • You will be prompted to set a password. This will also create the initial configuration files.
  1. Kill the VNC Server: Stop the VNC server you just started:
vncserver -kill :1
  1. Configure the VNC Session: Edit the xstartup file to start XFCE:
nano ~/.vnc/xstartup

Modify the file to include the following content:

#!/bin/bash
xrdb $HOME/.Xresources
startxfce4 &

Make the xstartup file executable:

chmod +x ~/.vnc/xstartup
  1. Restart the VNC Server: Start the VNC server again:
vncserver :1

Connect to the VNC Server: Use your VNC client to connect to your server’s IP address and port 5901 (which is :1 in VNC terminology).

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.