Remote-Desktop
Install xrdp on CentOS 7 / RHEL 7
Prerequisites:
1. This was written when xrdp is available neither on CentOS repositories nor on EPEL repository, after a lot of Google search; i found desktop repository (http://li.nux.ro/) which was having xrdp for CentOS 7 / RHEL 7. We need to manually setup the repository on CentOS 7.
2. Don’t forget to install Gnome on CentOS 7
Automatic (recommended):
Install EPEL and nux Desktop repository rpms.
# rpm -Uvh https://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm # rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm
Manual:
Create a repository file.
# vi /etc/yum.repos.d/xrdp.repo
Place the following content. Once added, save and close the file.
[xrdp] name=xrdp baseurl=http://li.nux.ro/download/nux/dextop/el7/x86_64/ enabled=1 gpgcheck=0
Installation:
Issue the following command to install xrdp
# yum -y install xrdp tigervnc-server
You will get the following output, make sure you are getting package from the newly created repository.
--> Running transaction check ---> Package xrdp.x86_64 0:0.6.1-2.el7.nux will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: xrdp x86_64 0.6.1-2.el7.nux xrdp 271 k Transaction Summary ================================================================================ Install 1 Package Total download size: 271 k Installed size: 1.5 M Is this ok [y/d/N]: y Downloading packages: xrdp-0.6.1-2.el7.nux.x86_64.rpm | 271 kB 00:05 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : xrdp-0.6.1-2.el7.nux.x86_64 1/1 Verifying : xrdp-0.6.1-2.el7.nux.x86_64 1/1 Installed: xrdp.x86_64 0:0.6.1-2.el7.nux
Once it is installed, lets start the xrdp service.
# systemctl start xrdp.service
xrdp will listen on 3389, lets confirm this by issuing following command.
# netstat -antup | grep xrdp tcp 0 0 0.0.0.0:3389 0.0.0.0:* LISTEN 1508/xrdp tcp 0 0 127.0.0.1:3350 0.0.0.0:* LISTEN 1507/xrdp-sesman
By default, services wont auto start after system reboot. Issue the following command to enable the service at system start up.
# systemctl enable xrdp.service
Next is to create iptables rule to allow rdp connection from the external machines, following command will add the exception for rdp port (3389).
# firewall-cmd --permanent --zone=public --add-port=3389/tcp # firewall-cmd --reload
Configure SELinux
# chcon --type=bin_t /usr/sbin/xrdp # chcon --type=bin_t /usr/sbin/xrdp-sesman
Test:
Now take rdp from any windows machine using Remote Desktop Connection, enter ip address of Linux server in computer field and click on connect.
CentOS 7 – xrdp MSTSC
You would be asked to enter the user name and password, you can either use root or any user that you have it on system. Make sure you use module “sesman-Xvnc”.
CentOS 7 – xrdp Login page
If you click ok, you will see the processing. In less than a half min, you will get a desktop.
CentOS 7 – xrdp Desktop
That’s All, you have successfully configured xRDP on CentOS 7 / RHEL 7. We welcome your comments.
Install xrdp on CentOS 7
Step 1: Do not forget to install Gnome on CentOS 7.
Step 2: Install and configure the EPEL repository using below command:
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Step 3: Add a nux repository using the following command:
rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm
Step 4: Use Yum command to install xrdp and tigervnc-server.
yum -y install xrdp tigervnc-server
Step 5: start the xrdp service using the following command:
systemctl start xrdp.service
Step 6: xrdp will listen on 3389, confirm this by issuing the following command.
# netstat -antup | grep xrdp
Output should be below:
tcp 0 0 0.0.0.0:3389 0.0.0.0:* LISTEN 1508 / xrdp
tcp 0 0 127.0.0.1:3350 0.0.0.0:* LISTEN 1507 / xrdp-sesman
Step 7: Issue the following command to enable the service at system startup.
systemctl enable xrdp.service
Step 8: Using the following commands Create iptables rule to allow RDP connection from external machines.
firewall-cmd --permanent --zone = public --add-port = 3389 / tcp
firewall-cmd --reload
Step 9: Configure SELinux using the following commands:
# chcon --type = bin_t / usr / sbin / xrdp # chcon --type = bin_t / usr / sbin / xrdp-sesman
Test Remote Connectivity
########################################################
# yum -y install tivervnc-server xrdp
# systemctl start xrdp.service
# systemctl enable xrdp.service
# netstart -ntlp | grep xrdp [ show port start xrdp]
# setenforce 0
Firewall
# firewall-cmd --permanent --zone=public --add-port=3389/tcp
# firewall-cmd --reload
Import the official GPG key of Nux Dextop repository
# rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
Install Nux Dextop Repo to RHEL 6/CentOS 6/ScientificLinux 6
# yum -y install epel-release && rpm -Uvh http://li.nux.ro/download/nux/dextop/el6/x86_64/nux-dextop-release-0-2.el6.nux.noarch.rpm
Install Nux Dextop Repo to RHEL 7/CentOS 7/ScientificLinux 7
# yum -y install epel-release && rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
How to check whether Nux Dextop Repository is Enabled or not
Run the below command to verify and confirm the Nux Dextop Repository is installed in your system.
# yum repolistLoaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: centos.bhs.mirrors.ovh.net * epel: mirror.cogentco.com * extras: centos.bhs.mirrors.ovh.net * nux-dextop: mirror.li.nux.ro * updates: centos.bhs.mirrors.ovh.net repo id repo name status base/7/x86_64 CentOS-7 - Base 9,007 *epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 9,093 extras/7/x86_64 CentOS-7 - Extras 191 icinga-stable-release/7 ICINGA (stable release for epel) 98nux-dextop/x86_64 Nux.Ro RPMs for general desktop use 2,351updates/7/x86_64 CentOS-7 - Updates 369 vz-base vz-base 1 vz-updates vz-updates 0 repolist: 21,117
How to Check whether the package is available from Nux Dextop Repository
Use the below command to search whether the package is available from Nux Dextop repo.
# yum --enablerepo=nux-dextop list smplayer shutterLoaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: centos.bhs.mirrors.ovh.net * epel: mirror.cogentco.com * extras: centos.bhs.mirrors.ovh.net * nux-dextop: mirror.li.nux.ro * updates: centos.bhs.mirrors.ovh.net Available Packagesshutter.noarch 0.93.1-1.el7.nux nux-dextop smplayer.x86_64 14.9.0.6994-1.el7.nux nux-dextop
How to install package from Nux Dextop Repository
Use the Nux Dextop command format like below to install package from Nux Dextop Repository. For example, i’m going to install smplayer shutter using Nux Dextop Repository.
# yum --enablerepo=nux-dextop
OR
# yum --enablerepo=nux-dextop install smplayer shutter
How to Check whether the package is installed from Nux Dextop Repository
Use the below command to check whether the package is installed from Nux Dextop repo.
# yum info smplayer Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: centos.bhs.mirrors.ovh.net * epel: mirror.cogentco.com * extras: centos.bhs.mirrors.ovh.net * nux-dextop: mirror.li.nux.ro * updates: centos.bhs.mirrors.ovh.net Installed Packages Name : smplayer Arch : x86_64 Version : 14.9.0.6994 Release : 1.el7.nux Size : 3.0 MRepo : nux-dextop/x86_64Summary : A graphical frontend for mplayer URL : http://smplayer.sourceforge.net/ License : GPLv2+ Description : smplayer intends to be a complete front-end for Mplayer, from basic features : like playing videos, DVDs, and VCDs to more advanced features like support : for Mplayer filters and more. One of the main features is the ability to : remember the state of a played file, so when you play it later it will resume : at the same point and with the same settings. smplayer is developed with : the Qt toolkit, so it's multi-platform. # yum info shutter Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: centos.bhs.mirrors.ovh.net * epel: mirror.cogentco.com * extras: centos.bhs.mirrors.ovh.net * nux-dextop: mirror.li.nux.ro * updates: centos.bhs.mirrors.ovh.net Installed Packages Name : shutter Arch : noarch Version : 0.93.1 Release : 1.el7.nux Size : 1.9 MRepo : nux-dextop/x86_64Summary : GTK+2-based screenshot application written in Perl URL : http://shutter-project.org License : GPLv3+ Description : Shutter is a GTK+ 2.x based screenshot application written in Perl. : Shutter covers all features of common command line tools like : scrot or import and adds reasonable new features combined : with a comfortable GUI using the GTK+ 2.x framework.