Windows 7/8 Remote Desktop Client accessing RHEL 6/7 Desktop

Install xRDP on CentOS / RHEL 6.x 7.x to allow a Windows 7 or 8 Remote Desktop Client to access the Linux Desktop. It also allows a Linux Client or Smartphone using an RDP Client.

Developers and Admin that want to extract, compile, build and hand install source code skip to Step#6

The simple, fast, easy method of installing and configuring xRDP.

1) Determine the architecture of the installed Linux kernel
# uname -r

2) Based on the reply from uname, select either a 32-bit or 64-bit install package

RHEL/CentOS 6 32-Bit
RHEL/CentOS 6 64-Bit

3) Install the EPEL repository

rpm -ivh epel-release-6-8.noarch.rpm

4) Verify the EPEL repository is installed

# yum repolist
epel Extra Packages for Enterprise Linux 6 – x86_64 10,220

5) Install xRDP and Tiger VNC Server

The xRDP service accepts the Windows RDP protocol and internally uses VNC to gain access to the Linux Desktop.

# yum install xrdp tigervnc-server
# service xrdp start
# chkconfig xrdp on
# chkconfig vncserver on

Skip to Step# 12

For Developers or Admins that want to Extract, Compile and hand install xRDP.

6) Download the xRDP server software for Centos / RHEL 6.x, 7.x from SourceForge.
# wget

7) Extract
# tar -xzvf xrdp-*.tar.gz
# cd xrdp-*

8) Pre-reqs for Compiling and Installing
# yum install autoconf automake libtool openssl-devel pam-devel libX11-devel libXfixes-devel
# yum install git patch gcc make autoconf libtool automake pkgconfig openssl-devel gettext file
# yum install pam-devel libX11-devel libXfixes-devel libXrandr-devel libjpeg-devel fuse-devel
# yum install flex bison gcc-c++ libxslt perl-libxml-perl xorg-x11-font-utils

9) Compile and Install
# ./bootstrap
# ./configure –enable-fuse
# make
# make install
# xrdp-keygen xrdp auto
# cp instfiles/pam.d/xrdp-sesman.other /etc/pam.d/xrdp-sesman

# cd xorg
# cd X11R7.6
# sudo mkdir /opt/X11rdp
# sudo chmod 777 /opt/X11rdp
# sh /opt/X11rdp
# ln -s /opt/X11rdp/bin/X11rdp /usr/local/bin/X11rdp

10) Starting xRDP

#/etc/xrdp/ start

11) Configuring xRDP to run on reboot

# cp /etc/xrdp/ /etc/init.d/
# chkconfig –add

12) Firewall settings

Temporarily disable the firewall.
# service iptables stop
# /sbin/iptables -F

Or, open port 3389 to TCP traffic
# iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3389 -j ACCEPT
# service iptables save
# service iptables restart
# iptables -L

13) Test accessing the Linux Desktop from Windows 7/8

Click START -> RUN -> type “mstsc”
Enter the IP Address or Hostname of the Linux Server and Login.

Leave a comment