How to install Ubuntu desktop on a Linode cloud

 

Install ubuntu on Linode cloud Linux

How to Install a Full Ubuntu Desktop with GUI on Linode: Step-by-Step Guide

Looking to set up a full Ubuntu desktop environment with a graphical interface on Linode? This guide walks you through the entire process, from deploying your Linode instance to installing a lightweight desktop environment and configuring remote access. Perfect for those who need a powerful, accessible cloud desktop.

Why Install a Full Ubuntu Desktop on Linode?

Installing a GUI on a cloud-based Ubuntu server can be valuable for users who prefer a graphical interface over command-line interactions or need desktop applications. By setting up an Ubuntu desktop on Linode, you gain a secure, remote environment for development, testing, or even productivity tasks.

Step 1: Deploy a New Linode with Ubuntu

  1. Log into your Linode account and head to the "Linodes" tab.
  2. Click "Create Linode".
  3. Under "Distributions", select Ubuntu. Choose the latest LTS version (like Ubuntu 22.04 LTS) for stability and support.
  4. Choose your Linode plan based on the resources you need.
  5. Select a data center region close to your location.
  6. Set a root password for your Linode instance.
  7. Click "Create Linode" to deploy your Ubuntu server.

Your Linode is now ready for configuration!

Step 2: Access Your Linode via SSH

After your Linode instance finishes deploying, you’ll connect via SSH to start setting it up.


ssh root@your-linode-ip

When prompted, enter the root password you set up during deployment.

Step 3: Update Your Ubuntu System

Keeping your system up to date is essential for security and performance. Run the following commands to update all packages:


apt update && apt upgrade -y

Step 4: Install a Desktop Environment on Ubuntu

For a cloud server, a lightweight desktop environment is best. We’ll install XFCE, which is known for its efficiency and low resource usage.


apt install -y xfce4 xfce4-goodies

This will install the XFCE desktop and a collection of useful add-ons.

Step 5: Install a Display Manager for GUI Login

A display manager lets you log into your GUI session. We’ll use LightDM for its simplicity and compatibility with XFCE.


apt install -y lightdm

If prompted to choose a default display manager, select LightDM.

Step 6: Configure Remote Access with VNC

To access your GUI remotely, use a Virtual Network Computing (VNC) server. We’ll install TigerVNC for this purpose.


apt install -y tigervnc-standalone-server

Configure VNC for XFCE

  1. Set a VNC password for secure access:


    vncpasswd
  2. Start the VNC server to create initial configuration files:


    vncserver
  3. Stop the VNC server (to adjust settings):


    vncserver -kill :1
  4. Edit the VNC startup script:


    nano ~/.vnc/xstartup

    Replace the file content with:


    #!/bin/sh unset SESSION_MANAGER unset DBUS_SESSION_BUS_ADDRESS startxfce4 &
  5. Make the script executable:


    chmod +x ~/.vnc/xstartup
  6. Restart the VNC server:


    vncserver

Your VNC server is now running on port 5901. You can add more sessions on subsequent ports (e.g., 5902, 5903).

Step 7: (Optional) Set Up a Secure SSH Tunnel for VNC Access

For additional security, you can tunnel your VNC connection over SSH.

Run this command on your local machine:


ssh -L 5901:localhost:5901 -N -f -l yourusername your-linode-ip

Then, use your VNC client to connect to localhost:5901.

Step 8: Connect to Your Linode Desktop with a VNC Client

Use a VNC client like RealVNC or TigerVNC Viewer to access your desktop.

  1. Open your VNC client.
  2. Enter the following connection details: your-linode-ip:5901.
  3. Input the VNC password you set earlier.

You should now see the XFCE desktop environment on your Linode!

Step 9: (Optional) Install XRDP for RDP Access

Prefer using RDP over VNC? Install XRDP to enable remote desktop protocol access.


apt install -y xrdp

Start the XRDP service:


systemctl enable xrdp systemctl start xrdp

With XRDP, you can connect using Remote Desktop Connection (on Windows) or any RDP client by entering your Linode’s IP address and login credentials.

Step 10: Reboot and Test Your Ubuntu GUI on Linode

Reboot your Linode to finalize the setup:


reboot

After rebooting, connect using your VNC or RDP client to confirm everything is running smoothly.

Final Thoughts

You’ve successfully installed a full Ubuntu desktop GUI on your Linode server! Now you can remotely access a powerful, flexible Linux desktop from anywhere. Whether you’re using it for development, testing, or general productivity, this setup provides a robust cloud-based desktop environment.

Comments