Setup GUI Screen for Ubuntu 14.04 LTS VM on Google Cloud

October 17, 2018

Once you have created Ubuntu 14.04 LTS Virtual Machine on Compute Engine, Please follow the below steps to setup GUI Screen for your Ubuntu.

Lets get started:

(A) Open SSH via Google Compute Engine in Ubuntu

Run the following commands in SSH

sudo apt-get update
sudo apt-get install ubuntu-desktop
sudo apt-get install gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal	
sudo apt-get install vnc4server

(B) Running VNC Server and Setting Password:

Run the following commands in SSH


It asks you for creation of password go ahead and create vnc4server password and port will be connecting to VNC will be 5901

(C) Creating Firewall Rule in Google Compute Engine:

Create a Firewall rule in compute engine and Open Port TCP 5901

(D) Download VNC Viewer:

Download the VNC Viewer from the below link:

(E) Connect to VNC Viewer:

IP Address: Your Compute Engine IP Address 
Password: Your VNC Password which you created in STEP B

And now you are connected to VNC Viewer, there are few steps remaining

Run the below code in VNC Viewer CMD Prompt:

sudo apt-get install gnome-core

Select Default Display Manager as gdm and Hit Enter

(E) SSH :

Again head back to SSH of Compute Engine and run the following commands in Ubuntu

sudo nano .vnc/xstartup

Add the below code to the bottom

gnome-panel &
gnome-settings-daemon &
metacity &

Save & Exit

And then run

vncserver -kill :1

Hurray, Now connect to the VNC Viewer, And Boom! You have a GUI setup for your Ubuntu 14.04 LTS VM(virtual machine) on Google Cloud Platform in no time

Leave a Reply:

Your email address will not be published. Required fields are marked *