Blog

Keep up to date with the latest news

Install Ubuntu Desktop on Google Cloud VM

If you need a GUI(Graphical User Interface) this tutorial will show you, How to install an Ubuntu desktop on Google Cloud. UI will look similar to default desktop environment you get on your local ubuntu desktop.

For a VM on a cloud platform like GCP, display drivers are usually handled by the virtualisation platform. However, it’s a good idea to ensure your system has the necessary drivers.

We need to set up a machine in few steps

  1. Create a Ubuntu VM instance on GC (Google Cloud)
  2. Set up an Ubuntu desktop environment in the VM instance
  3. Install and configure the Chrome Remote Desktop service on the VM instance.

Before you start:

Make sure VM is running on Google Cloud, if not running check Step 1 (follow the link)

Check if Google Chrome is installed. If you don’t have the Google Chrome browser installed, you can install it from the Google Chrome homepage.

To install Chrome Remote Desktop on your Ubuntu VM instance, follow these steps:

1. Access Your VM Instance:

Make sure you are connected to your Ubuntu VM instance using SSH:

bashCopy codessh username@instance-ip

Replace username with your actual username and instance-ip with the external IP address of your VM instance.

2. Install Chrome Remote Desktop Dependencies:

bashCopy codesudo apt-get install --assume-yes xfce4 desktop-base
sudo apt-get install --assume-yes xscreensaver

3. Download and Install Chrome Remote Desktop:

bashCopy codewget https://dl.google.com/linux/direct/chrome-remote-desktop_current_amd64.deb
sudo dpkg --install chrome-remote-desktop_current_amd64.deb
sudo apt-get install --assume-yes --fix-broken

4. Configure Chrome Remote Desktop:

Run the configuration script:

bashCopy codesudo dpkg-reconfigure chrome-remote-desktop

Follow the prompts to set up Chrome Remote Desktop:

  • Enter a name for the computer.
  • Choose whether to allow other users to access the desktop.
  • Set a PIN for secure access.

5. Enable Remote Access:

Visit the Chrome Remote Desktop website and sign in with your Google account. You should see your VM listed under “Remote Devices.”

6. Access Ubuntu Desktop Remotely:

From another computer, open a web browser and navigate to the Chrome Remote Desktop website. Sign in with the same Google account.

Click on your VM instance to start a remote session. Enter the PIN you set during the configuration.

You should now be connected to your Ubuntu desktop environment remotely using Chrome Remote Desktop.

Important Notes:

  • Ensure that your VM instance has a public IP address, and the necessary firewall rules allow traffic on ports 22 (SSH) and 5900 (VNC).
  • The steps above use XFCE as the desktop environment for compatibility with Chrome Remote Desktop. If you prefer GNOME or another desktop environment, you may need to adjust the installation commands accordingly.
  • Always follow security best practices, including using strong passwords and securing SSH access.

This setup provides a basic remote desktop environment using Chrome Remote Desktop on a GCP VM. Adjustments may be needed based on specific requirements or preferences.

Leave a Reply

Your email address will not be published.