How To Remote Desktop from windows to Linux ( Centos 7)

  1. How To Remote Desktop from windows to Linux ( Centos 7)

I will show you how to install & setup Linux Remote Desktop (XRDP) on CentOS7/RHEL 7. The installation process is quite simple; you just need to follow below steps.

Note: XRDP is not available on official repository of CentOS7/RHEL7.

We need to download and add EPEL (Extra Packages Enterprise Linux).

Install EPEL repository on CentOs/RHEL 7 directly from internet.

  • Both 32-bit and 64-bit packages are available.

For RHEL7 or CentOS7 7.x 32-bit

rpm -ivh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

For RHEL7 or CentOS7 7.x 64-bit

rpm -ivh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

After Installing EPEL Repository on your linux box, Now lets move on the real action.

Step 2: Remote Desktop Linux Client (XRDP)

Run the below command in linux terminal window.

yum install xrdp tigervnc-server -y

Step 3: Start XRDP Service

systemctl start xrdp

Check port 3389 is in listening mode, to make sure XDRP service is up and running Use the following command.

netstat -antlup | grep xrdp

Step 4: Enable XRDP Service at Startup

systemctl enable xrdp

Step 5: Allow 3389 Port in the Linux Firewall

Add rule for remote desktop port 3389 in Linux Firewall.

firewall-cmd –permanent –zone=public –add-port=3389/tcp
firewall-cmd –reload

Step 6: Configure SELinux to allow XRDP

chcon –type=bin_t /usr/sbin/xrdp
chcon –type=bin_t /usr/sbin/xrdp-sesman

Step 7: Test Remote Desktop Connection from Windows to Your Linux Machine.

Now back on your windows and open Remote Desktop Connection Window by typing mstsc in Run command box.

Next you need to Provide username and password of your Linux machine and hit ok.(you can use root or any other user credentials).

After some startup settings, you will get a desktop of your Linux machine on your windows PC

Thats all, we have successfully setup remote desktop feature on CentOS7.

Leave a comment