How to setup xrdp Server

dos2unix

Well-Known Member
Joined
May 3, 2019
Messages
3,525
Reaction score
3,287
Credits
31,524
Note: This was only done on RockyLinux 9.x and Fedora41. I suspect other distro's may be similar, but since I didn't test them, I won't mention them here.

What is xrdp? It's like rdp for Windows. It lets you view, login to and use a remote computers Graphical desktop. It's just like being logged into that computer locallly.

This step only applies if you don't already an Xwindows GUI installed. If you already have Gnome or KDE or a DE installed, skip down to the next section.
Code:
# For Redhat9/Rocky9/Alma9
dnf install -y dnf-plugins-core
dnf config-manager --set-enabled crb
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm

# For Fedora
# dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
# dnf config-manager setopt fedora-cisco-openh264.enabled=1

dnf update -y
dnf groupinstall "Server with GUI" -y
systemctl set-default graphical.target

Once you have the desktop GUI installed do this.
Code:
dnf install xrdp -y
systemctl enable xrdp --now
systemctl status xrdp

firewall-cmd --permanent --add-port=3389/tcp
firewall-cmd --reload

Next we need to edit the /etc/xrdp/xrdp.ini file.

Find the section that looks like this. It's about 3/4ths of the way down.
Code:
[Xvnc]
name=Xvnc
lib=libvnc.so
username=ask
password=ask
ip=127.0.0.1
port=-1
#xserverbpp=24
#delay_ms=2000

You have two options here, you can replace this section with the code below, or you can just paste this a couple of lines
below that code. It should look like this.
Code:
[Xvnc]
name=Xvnc
lib=libvnc.so
username=ask
password=ask
ip=127.0.0.1
port=-1

#xserverbpp=24
#delay_ms=2000

[xrdp1]
name=sesman-Xorg
lib=libxup.so
username=ask
password=ask
ip=127.0.0.1
port=-1

The advantage to leaving both sections, is that you can use RDP and VNC. Save the file, and reboot.
You are done.
 
Last edited:


On the client computer. I will assume you already have an Xwindows environment installed. This was
tested with Gnome, Mate and KDE.

Code:
dnf install remmina -y
firewall-cmd --permanent --add-port=3389/tcp
firewall-cmd --reload

In Remmina, use RDP drop down. Type IP, user name and password of remote system user.
Domain not required.

That's it. You should see the remote desktop. This even works from Windows. No VNC client required.
 
You can even connect to your Linux computer from Windows.

Screenshot 2025-02-15 075652.png


Open up your Remote Desktop Connection" app in Windows and type in the IP address of your Linux system running xrdp.

Screenshot 2025-02-15 075705.png


If you're lazy like me and you didn't update your ssl certificates, you'll see this error.
(I should do an article on how to do that someday)
But for now, since we know this is really your computer, go ahead and click on "Yes".

Screenshot 2025-02-15 075721.png


You should then see the Xwindows greeter on the remote computer. Type in the same username and password that you would if you were logging in locally on that computer.

Screenshot 2025-02-15 075839.png


And depending on the speed of your computer and your network, this should popup after a couple of moments.
This won't be quite as snappy as running everything locally. There is a little latency. I wouldn't recommend playing any graphic intensive games this way. But for everything else it usually works pretty good. It does not play audio remotely.
 
Last edited:


Members online


Top