Install a GUI on Ubuntu 22.04 LTS and Set Up RDP Access

Table of Contents

Introduction to Install a GUI on Ubuntu 22.04 LTS and Set Up RDP Access

Many users require Remote Desktop Protocol (RDP) access for various applications and web browsing. However, due to the licensing requirements of Windows, the cost of RDP access can be prohibitively high. To address this, I suggested to a client that they could use Ubuntu with a GUI. Ubuntu provides a cost-effective solution with the capability to install and upgrade applications easily while maintaining excellent security. This guide will walk you through to install a GUI on Ubuntu 22.04 LTS, creating a new user for RDP access, and enabling root access for RDP.

Step 1: Install the GUI and xRDP

1. Update your system:

sudo apt update
sudo apt upgrade
    

2. Install ubuntu-desktop and slim display manager:

sudo apt install ubuntu-desktop slim
    

3. Install xRDP:

sudo apt install xrdp
    

4. Enable and start the xRDP service:

sudo systemctl enable xrdp
sudo systemctl start xrdp
    

Step 2: Configure xRDP to Use XFCE Desktop Environment

1. Install XFCE and additional goodies:

sudo apt install xfce4 xfce4-goodies
    

2. Set XFCE as the default session for RDP:

echo xfce4-session >~/.xsession
    

3. Allow xRDP through the firewall:

sudo ufw allow 3389/tcp
    

Step 3: Create a New User for RDP Access

1. Create a new user named “newuser”:

sudo adduser newuser
    

2. Follow the prompts to set the password and user information.

3. (Optional) Grant administrative privileges to the new user:

sudo usermod -aG sudo newuser
    

4. Ensure the new user has a home directory and necessary configuration files:

sudo mkdir /home/newuser
sudo chown newuser:newuser /home/newuser
sudo -u newuser cp -r /etc/skel/. /home/newuser/
    

5. Switch to the new user:

su - newuser
    

6. Create and configure the .xsession file for the new user:

echo xfce4-session > ~/.xsession
chmod 600 ~/.xsession
    

Step 4: Allow Root Login for RDP

1. Open the xRDP configuration file:

sudo nano /etc/xrdp/xrdp.ini
    

2. Modify the configuration file:

[Xvnc]
allow_root=true
    

3. Set a password for the root user:

sudo passwd root
    

4. Switch to the root user:

sudo -i
    

5. Create and configure the .xsession file for the root user:

echo xfce4-session > /root/.xsession
chmod 600 /root/.xsession
    

6. Restart the xRDP service:

sudo systemctl restart xrdp
    

Step 5: Connect Using Remmina

1. Open Remmina on your local machine.

2. Create a new connection profile:

Click the + button to create a new connection.

3. Set up the connection:

Name: Enter a name for your connection (e.g., “Ubuntu newuser Desktop” or “Ubuntu Root Desktop”).

Protocol: Select RDP - Remote Desktop Protocol.

Server: Enter the IP address of your Ubuntu machine.

Username: Enter newuser or root.

Password: Enter the password for the user.

4. Save and Connect:

Click Save to save the connection profile. Select the profile you just created and click Connect. If prompted, enter your credentials again.

By following these steps, you will have successfully installed a GUI on your Ubuntu 22.04 LTS server, configured xRDP, created a new user for remote desktop access, and enabled root access for RDP. This setup provides a cost-effective and secure alternative to Windows for RDP access.

If you need further assistance, don’t hesitate to comment, and we would love to help you troubleshoot the process of installing a GUI on Ubuntu using SSH access.

Do you need an Ubuntu server as well? You can order one through us as a Premium Partner of IONOS. You can order directly on our Partner Portal or through our Services Page.

Table of Contents

What we offer

Web Hosting by 32N Co

Digital Presense

Web Hosting by 32N Co

Domain Registeration, Hosting, Web Design & Development, Brand Building and Everything!

Get Started
DevOps Services by 32N Co

DevOps

DevOps Services by 32N Co

Expert DevOps Services for Seamless Software Deployments on Cloud

Get Started
Support Services by 32N Co

IT Project Management

Support Services by 32N Co

Efficient IT project delivery through strategic management

Get Started

Leave a Reply

more insights