How to install XRDP with XFCE4 on Ubuntu? [SOLVED]


Author: Omer Cakmak
Reviewer: Deepak Prasad

Ubuntu is a popular Linux operating system. As with most Linux distributions, it can be used with different desktop environments (XFCE, KDE, Gnome etc). The XFCE desktop environment is popular with Ubuntu users as it is a lightweight desktop environment.

Xrdp, on the other hand, is an application that provides remote access to Ubuntu using the remote desktop protocol (RDP).

In this article, we will explain the steps to install and configure xrdp for users using the XFCE desktop environment in the Ubuntu operating system.

If you do not have the XFCE desktop environment in Ubuntu, you can see the steps for installation in the step below. If it is already installed, you can continue with XRDP installation.


Step-1: Install XFCE

First pull the package list and get the updates:

foc@ubuntu20:~$ sudo apt update && sudo apt upgrade

This command will update all packages in the system and upgrade them to the latest version. Enter the following command to install Xfce4:

foc@ubuntu20:~$ sudo apt install xfce4 tasksel -y

Then all the dependencies of XFCE are installed with tasksel:

foc@ubuntu20:~$ sudo tasksel

If there are different desktop environments you want to install on this screen, you can choose:

install xrdp with xfce4 on Ubuntu

On the login screen, select the XFCE session and login:

How to install XRDP with XFCE4 on Ubuntu? [SOLVED]

XFCE4 desktop environment installation completed successfully.

How to install XRDP with XFCE4 on Ubuntu? [SOLVED]


Step-2: Install XRDP

Enter the following command to install xrdp:

foc@ubuntu20:~$ sudo apt install xrdp -y

Enter the following command in terminal to enable xrdp service :

foc@ubuntu20:~$ sudo systemctl enable xrdp
Synchronizing state of xrdp.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable xrdp

and start the service:

foc@ubuntu20:~$ sudo systemctl start xrdp

Optional: If you are using a firewall, enter the following command to edit the firewall settings:

foc@ubuntu20:~$ sudo ufw allow 3389/tcp
Rules updated
Rules updated (v6)

And reload the firewall:

foc@ubuntu20:~$ sudo ufw reload
Firewall reloaded


Step-3: XRDP Configuration

Change the /etc/xrdp/ file as follows, this will prevent you from getting a black screen:

foc@ubuntu20:~$ sudo vi /etc/xrdp/

The following lines are added above the "test -x /etc/X11/Xsession && exec /etc/X11/Xsession" line:


The "xfce4-session" command is added to the ".xsession" file to allow the Xfce desktop to start automatically whenever the user logs in:

foc@ubuntu20:~$ echo xfce4-session >> ~/.xsession

Note: Many configurations such as login screen sizes(width,height), rdp port(3389) information are included in the txrdp.ini file.

foc@ubuntu20:~$ sudo nano /etc/xrdp/xrdp.ini

The xrdp service needs to be restarted after the change:

sudo systemctl restart xrdp

Configuration complete, let's connect.


Step-4: XRDP Connection

You can use different RDP applications according to the operating system you are using. Some RDP applications you can use as examples:

  • Remmina
  • Connections
  • Vinagre
  • KRDC
  • FreeRDP
  • rdesktop
  • NoMachine
  • ThinLinc
  • TigerVNC
  • Guacamole

For example, let's connect with the Gnome Connections application:

xrdp with xfce4 on Ubuntu

Enter the username and password with the authorization to log on to the remote server:

How to install XRDP with XFCE4 on Ubuntu? [SOLVED]

Connection established. Introducing XFCE4 on Ubuntu.

How to install XRDP with XFCE4 on Ubuntu? [SOLVED]

If you want to RDP on Windows, you can access the remote desktop connection by typing "mstsc" in the run window or command line:

How to install XRDP with XFCE4 on Ubuntu? [SOLVED]



We explained XRDP installation and configuration to make RDP connection to XFCE4 desktop environment in Ubuntu. Depending on the Ubuntu version, there may be changes in the configurations, but in general the above steps will suffice.


References - xrdp


Views: 1,534
Omer Cakmak

Omer Cakmak

He is highly skilled at managing Debian, Ubuntu, CentOS, Oracle Linux, and Red Hat servers. Proficient in bash scripting, Ansible, and AWX central server management, he handles server operations on OpenStack, KVM, Proxmox, and VMware. You can connect with him on his LinkedIn profile.

Can't find what you're searching for? Let us assist you.

Enter your query below, and we'll provide instant results tailored to your needs.

If my articles on GoLinuxCloud has helped you, kindly consider buying me a coffee as a token of appreciation.

Buy GoLinuxCloud a Coffee

For any other feedbacks or questions you can send mail to

Thank You for your support!!

Leave a Comment