Hi There,
In this tutorial I will show you how to RDP into your CentOS 7 Server. This tutorial will also work on a Redhat 7 server. In order to follow this tutorial you will need to be sure that you have CentOS 7 installed with the GNOME Desktop. If you haven’t done this yet be sure to follow this tutorial to get up to speed.
The first thing that we need to do is to add two repos to our CentOS server. The two commands that you need to run are:
- sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm
- sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm
Next we will install the xrdp software package and then start it as a service. The commands to do this are:
- sudo yum -y install xrdp tigervnc-server
- Sudo systemctl start xrdp.service
Now we need to allow the ports for xrdp through the firewall. After that we’ll need to restart the firewall service. This can be done by running these commands.
- sudo firewall-cmd –permanent –zone=public –add-port=3389/tcp
- sudo firewall-cmd –reload
Finally we need to configure SELinux. To do so run these two commands:
- sudo chcon –type=bin_t /usr/sbin/xrdp
- sudo chcon –type=bin_t /usr/sbin/xrdp-sesman
We can now try to RDP to our CentOS 7 server.
First open RDP and type in the IP address of you CentOS 7 Server.
If you get certificate warnings click yes to continue.
Now enter your CentOS username and password
You will now be brought to your CentOS Desktop.
A full video of this tutorial can be seen here:
Nice write up.
Note:
The web editor’s auto-correct changed his commands.
The commands that have flags with — are showing up as –.
Update command:
sudo firewall-cmd –permanent –zone=public –add-port=3389/tcp
sudo firewall-cmd –reload
sudo chcon –type=bin_t /usr/sbin/xrdp
sudo chcon –type=bin_t /usr/sbin/xrdp-sesman
Need to add:
yum groupinstall “server with gui”
Hello, when i am trying to install xrdp tigervnc-server i get the following error. Any help please?
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: http://ftp.ntua.gr
* epel: http://ftp.ntua.gr
* extras: http://ftp.ntua.gr
* nux-dextop: mirror.li.nux.ro
* updates: http://ftp.ntua.gr
Resolving Dependencies
–> Running transaction check
—> Package tigervnc-server.x86_64 0:1.8.0-5.el7 will be installed
—> Package xrdp.x86_64 1:0.9.8-1.el7 will be installed
–> Processing Dependency: xorgxrdp for package: 1:xrdp-0.9.8-1.el7.x86_64
–> Running transaction check
—> Package xorgxrdp.x86_64 0:0.2.8-3.el7 will be installed
–> Processing Dependency: xorg-x11-server-Xorg(x86-64) = 1.20.1 for package: xorgxrdp-0.2.8-3.el7.x86_64
–> Finished Dependency Resolution
Error: Package: xorgxrdp-0.2.8-3.el7.x86_64 (epel)
Requires: xorg-x11-server-Xorg(x86-64) = 1.20.1
Installed: xorg-x11-server-Xorg-1.19.5-5.1.el7_5.0.1.x86_64 (@updates)
xorg-x11-server-Xorg(x86-64) = 1.19.5-5.1.el7_5.0.1
Available: xorg-x11-server-Xorg-1.19.5-5.el7.x86_64 (base)
xorg-x11-server-Xorg(x86-64) = 1.19.5-5.el7
Available: xorg-x11-server-Xorg-1.19.5-5.1.el7_5.x86_64 (updates)
xorg-x11-server-Xorg(x86-64) = 1.19.5-5.1.el7_5
You could try using –skip-broken to work around the problem
You could try running: rpm -Va –nofiles –nodigest
Hey Roy,
A mirror / package update is currently taking place. Some few mirrors already show xorg-x11-server-Xorg(x86-64) = 1.20.1
I did this to get around it:
yum install xrdp –enablerepo=cr
for now as the xorg-x11-server-Xorg(x86-64) = 1.20.1 packages should be available in the continuous release repo.
Test?
I have done this and it worked brilliantly but then I reboot the machine it boots right up until I get to select user and then just black screens. The caps lock light is unresponsive but I can still ping the machine and webmin into it. So odd, I am an absolute novice when it comes to linux but willing to try. Would you have any idea what I am doing wrong? I have rebuilt the machine twice now. I changed the graphics card on the last build to a nvidea K2000 with not luck. Thank you in advance for any help.
i have done this but when i connect i have only black screen and my mouse pointer please help
Hi, I also only get a black screen, did you maybe find a solution?
Pingback: How To RDP into CentOS 7 from Windows | Host your Website
Pingback: How To RDP into CentOS 7 from Windows – My blog
this works until the remote centos 7 gnome desktop is displayed and then RDP automatically closes the window/disconnects. any idea how to fix this? thanks.
Were you able to find a fix for you issue? I am having the same issue.
Edit the xrdp.ini file located at the /etc/xrdp/xrdp.ini.
Comment out the line that says “Channel_code=1”.
Hi, trust all is well. Must say, great tutorial. But I get a black screen when connected, do you maybe know the reason?