Install Xrdp Server in ubuntu

How to Install Xrdp Server (Remote Desktop) on Ubuntu

Xrdp is an open-source Microsoft Remote Desktop Protocol (RDP) that allows users to connect and control ubuntu using RDP.

Installing Desktop Environment in Ubuntu

In the Linux servers don’t have desktop desktop installed. if you need to install RDP on Ubuntu first install X11 and a lightweight desktop environment that will act as a backend for Xrdp.

In ubuntu repositories there are several desktop environments available. We will be installing Xfce . It is a fast, stable, and lightweight desktop desktop environment.

Type the following commands as a sudo user for install Xfce on your server:

1. first need to update your server using following command.

 $ sudo apt-get update

2. After update completed now install 

$ sudo apt install xfce4 xfce4-goodies xorg dbus-x11 x11-xserver-utils

Installing Xrdp

1. Xrdp package is available in the default Ubuntu repositories. for install Xrdp use the following command.

$ sudo apt install xrdp

2. check the status of xrdp service using following command.
$ sudo systemctl status xrdp

By default Xrdp uses the /etc/ssl/private/ssl-cert-snakeoil.key file which is readable only by That users who are members of the “ssl-cert” group. Run the following command to add the user to the group :

$ sudo adduser itsuupport ssl-cert

The Xrdp configuration files are located in the /etc/xrdp directory. If you require only conect Xrdp connections then you no need to any changes to the configuration files. By default Xrdp uses X Window desktop, which in this case, is XFCE. The main configuration file is named xrdp.ini. If you make any changes in the configuration file you need to restart the Xrdp service using following command.

$ sudo systemctl restart xrdp

Configuring Firewall 

By default, Xrdp Working on 3389 Port. If firewall running on your Ubuntu server then you need to allow 3389 port connect xrdp.

1. Check stratus of firewall.

$ sudo ufw status

2. If firewall active on your ubuntu server need to allow 3389 for connact Xrdp. for add the 3389 port use following command.

$ sudo ufw allow 3389

Now 3389 port allowed in firewall

For allow  Xrdp server access from a specific IP address or IP range use the following command.

$ sudo ufw allow from to any port 3389

Connecting to the Xrdp Server form windows operating system

1. Click on start and search mstsc.

2. Type IP Address of ubuntu server and click on connect.

3. Click on Yes.

4. in session select Xorg, type username and password, click on OK.

Post a Comment