How to access & install desktop GUI for Ubuntu cloud servers

Nick Chase - August 4, 2021 - , ,

One great thing about cloud computing is that it provides you an opportunity to easily run other operating systems — for example, I have a Mac laptop but often need Ubuntu — but unfortunately, getting access to the GUI for things like the browser or other non-command-line tasks often isn’t available out of the box. Fortunately, it’s straightforward if you know what you need to do.

Here’s a tutorial video of how to access the desktop GUI for an Ubuntu cloud server if you would like to follow along.

video thumbnail

How to access the GUI on a cloud Ubuntu instance

Start by making sure the machine itself is up to date:

sudo apt update

sudo apt upgrade

Install a Ubuntu desktop manager

You’ll need an actual desktop manager, so let’s go ahead and install ubuntu-mate-desktop:

sudo apt install ubuntu-mate-desktop 

When it asks you for the Default display manager, choose gdm3.

Install VNC Server

The last thing you need on the server is an instance of VNC Server, which you’ll use to view the actual desktop:

sudo apt install tightvncserver

Start the VNC Server

Finally, start the server:

vncserver :1

Set a password and choose whether to create a read only user.

If you need to stop or restart VNC, you can do it by killing the server:

vncserver -kill :1

Access the VNC Server using a VNC Client

Now you need to get ready to access the VNC server, which will provide you access to the desktop.  To do that, download the VNC viewer from https://www.realvnc.com/en/connect/download/viewer/ and choose File->New Connection.  The actual address for the server is the IP address followed by :1, as in:

Now, keep in mind that despite what it looks like, the server isn’t actually running on port 1, but rather on port 5901, so check your inbound security rules to make sure that port 5901 is open.

If you are in AWS, for example, you can make sure this port is available by going into the Security options, then Security Group, and then edit the inbound rules. Then add a rule that allows access to port 5901 to everyone, or your particular IP address. 

Finally, to access the server, double-click it in your list of servers:

Note that in this case we’re not encrypting the data that passes between your local machine and the server, so if this is acceptable, choose Continue when it asks about the Unencrypted Connection.  From there, you will see the desktop:

From here you should be able to do everything you could do if you were working on the cloud machine locally.  For example, you could install and run the Lens IDE and work with your Kubernetes clusters from a cloud-based Ubuntu environment.

banner-img
test
tst
tst
Deploy Mirantis Secure Registry on any Kubernetes (Minikube, EKS, GKE, K0S, etc.)

Note: this blog post was originally published by Avinash Desireddy on Medium. You can view the original post here. Docker Containers, Kubernetes, CNCF, and many other relevant projects completely changed how we package, ship, and run applications. As you all know, Kubernetes has become a defacto standard for running applications. At the same time, container registries and chart repositories play a …

Deploy Mirantis Secure Registry on any Kubernetes (Minikube, EKS, GKE, K0S, etc.)
Software Supply Chain Security on Any Kubernetes with Mirantis Secure Registry 3.0

Security and cloud infrastructure availability concerns have been in the news of late with the recent Log4j vulnerabilities and outages at some of the world’s largest public cloud providers. The security and integrity of your container-based images has never been more important. Many have taken to Kubernetes to assist in the deployment and management of their container-based workloads, and are leveraging …

Software Supply Chain Security on Any Kubernetes with Mirantis Secure Registry 3.0
A Year in Review: A Look Back at the Most Powerful Mirantis Resources from 2021

2021 has been quite the year - and while there have been plenty of not-so-good times, we at Mirantis would like to take a moment to focus on the good. We are thankful for the opportunity to provide our readers with informative, accurate, and, above all, educational content via our company blog. We try not only to include helpful information …

A Year in Review: A Look Back at the Most Powerful Mirantis Resources from 2021
FREE EBOOK!
Service Mesh for Mere Mortals
A Guide to Istio and How to Use Service Mesh Platforms
DOWNLOAD
Technical training
Learn Kubernetes & OpenStack from Deployment Experts
Prep for certification!
View schedule
LIVE WEBINAR
Istio in the Enterprise: Security & Scale Out Challenges for Microservices in k8s

Presented with Tetrate
SAVE SEAT