Installing and Configuring XRDP on Ubuntu 22.04 with GNOME or LXDE
XRDP is a free and open-source implementation of the Microsoft RDP server that enables operating systems other than Microsoft Windows to provide a fully functional RDP-compatible remote desktop experience. In this article, we are going to learn how to install Xrdp on Ubuntu 22.04 with two popular desktop environments: GNOME and LXDE.
GNOME and LXDE are two popular desktop environments for Linux-based systems. GNOME is a modern, feature-rich, and visually appealing desktop environment but is resource-intensive. LXDE is lightweight, efficient, and ideal for older hardware, offering a traditional desktop experience with minimal resource usage.
Try this wiki on our VPS. Starts just at $5/month with 24x7 In-house customer support.
Pre-requisites :
- A system with Ubuntu 22.04 installed and running.
- Root access to the system.
Update your System
First, update your system with the latest packages:
apt update -y && apt upgrade -y
There are two options to install a GUI desktop: GNOME and LXDE
Option 1: XRDP with GNOME Desktop
If you want to use the GNOME Desktop, click here to expand the steps.
Installing Gnome GUI
1. You can install Gnome GUI using the following command.
apt install ubuntu-gnome-desktop -y
2. To enable the GUI as default and boot into graphical mode, create or modify the .xsession file in your home directory
echo gnome-session > ~/.xsession
Option 2: XRDP with LXDE Desktop
If you want to use the LXDE Desktop, click here to expand the steps.
Installing LXDE GUI
1. You can install LXDE GUI using the following command.
apt install lxde -y
2. To enable the GUI as default and boot into graphical mode, create or modify the .xsession file in your home directory.
echo "startlxde" > ~/.xsession
Install XRDP
Let's install and enable XRDP using the below commands:
apt install xrdp
systemctl start xrdp
systemctl enable xrdp
Allow XRDP Through Firewall
If the Firewall is Enbled on your server, open the necessary port for XRDP through the firewall:
ufw allow 3389/tcp
ufw reload
Configure Polkit Rules
To prevent authentication issues, set up Polkit rules by creating the file /etc/polkit-1/localauthority.conf.d/02-allow-colord.conf
nano /etc/polkit-1/localauthority.conf.d/02-allow-colord.conf
Add the following content,
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.color-manager.create-device" ||
action.id == "org.freedesktop.color-manager.create-profile" ||
action.id == "org.freedesktop.color-manager.delete-device" ||
action.id == "org.freedesktop.color-manager.delete-profile" ||
action.id == "org.freedesktop.color-manager.modify-device" ||
action.id == "org.freedesktop.color-manager.modify-profile") {
return polkit.Result.YES;
}
});
Reboot the system
reboot
Connecting to the XRDP Server
After successfully installing XRDP with the GNOME GUI, you can connect to the remote server using the Windows RDP Connection.
Open Remote Desktop Connection on your Windows computer.
Press Win + R to open the Run dialog box. and type mstsc and press Enter. This will open the Remote Desktop Connection application
Enter the public IP address of your Debian server.
Click "Connect." You will be prompted to enter the login credentials to access the server.
After logging in, you might be prompted to complete the initial GNOME GUI setup. Follow the on-screen instructions to finish the setup process.
By following these steps, you can successfully connect to and interact with your Debian server's GNOME GUI from your Windows computer.
CrownCloud - Get a SSD powered KVM VPS at $4.5/month!
Use the code WELCOME
for 10% off!
1 GB RAM / 25 GB SSD / 1 CPU Core / 1 TB Bandwidth per month
Available Locations: LAX | MIA | ATL | FRA | AMS