How to set up XRDP on an Azure RHEL machine
- Ali ÇOLAK
- 2 Şub 2024
- 2 dakikada okunur
Hi again,
Today I am going to leave you with something a little different than usual. A few days ago I got my Azure Portal account and wanted to try something on RHEL. So, after deploying my virtual machine I noticed that I didn't have any GUI to access and so on. Now this will sound normal to other Linux pro's but people like me prefer GUI over CLI to be honest. I did some research and found a way to get a real GUI using XRDP. So I could connect to it from anywhere. Now lets get into how to do this easily, shall we? :)
1. I do skip the creating a virtual machine and so the network steps because it will sound much complicated to the others i think. After creating the virtual machine with RHEL distro we need to do somechanges in Firewall side. We need to create a rule which depends the RHEL RDP protocol.
2. As you can see from the image all you need to do is create a rule, set the priority value as 100 then set the port 3389 and make it as "Allow".
3. After setting up our rules like in the image, connect your virtual machine with SSH protocol. Get sudo rights. Follow these commands one by one.
4. This command is just for installing the EPEL repository. EPEL is for the Enterprise Linuxes. It includes the packages for them. And packages of course we need :) You should choose the right command for your RHEL version from HERE if you encounter with an error.
yum -y update
reboot5. The EPEL repo is addes to our system and now we need to update our packages to be sure they're ready to go.
yum groupinstall “Server with GUI”
yum install tigervnc-server xrdp
systemctl start xrdp.service
systemctl status xrdp.service6. Now the system is rebooted so we can continue to our process. With these commands we install the XRDP and the needings. Last command is for check the XRDP status. It will show us something like this if everything is okay.
7. That provides us everything is working precisely. And so on you should enter these commands for last.
systemctl enable xrdp.service
netstat -antp | grep xrdp
systemctl status firewalld.service
systemctl enable firewalld.service
systemctl start firewalld.service
firewall-cmd --permanent --add-port=3389/tcp
firewall-cmd --reload
sudo passwd root8. If you encounter with errors on "firewall-cmd" commands just write them yourself do not copy paste. :) On passwd you should enter a strong password for extra security. If you okay with your current one you can skip that. For last you should reboot again.
9. Now, on windows run "mstsc" and then enter your virtual machine ip to log in.
And we're in with the beautiful neofetch info section :)
Hope this article help you guys!




Yorumlar