How to install and configure xrdp for remote session

0 2001

In this tutorial we will learn about xrdp. We have already discussed about How to configure and use VNC for remotely accessing server earlier. We will discuss difference between xrdp and VNC briefly. We will install and xrdp server.


Xrdp is daemon that supports Windows Remote Desktop Protocol. Xrdp is very easy to config and use as compare to VNC server. Xrdp utility provide us platform to access Linux in Windows environment. Xrdp is light weight and easy to setup as compared to VNC. With xrdp you can lock remote system and can map local devices where as in VNC you can not.. By default it listens on port number 3389.

Make sure you have installed GNOME Desktop on your distro.

To  install xrdp and tigervnc-server you can use command.

[root@faraz ~]# yum install xrdp  tigervnc-server

After installation you need to configure SELinux because you need change the file context by using command chcon which stand for change context. Through this command change the SELinux security context of each file. You do not need to pay much attention to SELinux commands at this stage. Just use below commands

[root@faraz ~]# chcon  --type=bin_t  /usr/sbin/xrdp

[root@faraz ~]# chcon  --type=bin_t  /usr/sbin/xrdp-sesman

Now you are able to start the service of xrdp or you can set at boot time by using keyword enable.

[root@faraz ~]# systemctl start xrdp.service

If your firewall is running then stopfirewall by using command systemctl stop firewalld or make rule for xrdp with defining the port number 3389.

[root@faraz ~]# firewall-cmd   --permanent   --zone=public   --add-port=3389/tcp

[root@faraz ~]# firewall -cmd  --reload

Now your configuration is complete you can use Linux from any Windows machine by using remote desktop connection. Click on start button and write in the text area “Remote Desktop or mstsc” you will the application for remote connection click on it. Dialog box will open, enter the IP of Linux Server and click connect button.

mstsc remote access

You will see the xrdp login panel of session sesman-Xvnc enter username and password which is on Linux server choose any one or you can access from root also.

Xvnc sesman access to linux

It may take a minute or depending on your machine.

xrdp remote windows

We have successfully connected with xrdp Linux from Windows.


We have seen  it is very easy to install and  configure  xrdp. Only the technique of SELinux is required to change the security context of the file. If you face any problem during installation and configuration. Please let us know . Again thanks for visiting our blog and feel free to subscribe on newsletter.See you in next tutorial



Join us by subscribing to our newsletter and learn IT subjects for free
We hate spam. Your email address will not be sold or shared with anyone else.

Leave a reply

You must be logged in to post a comment.