AlmaLinux 9 and Rocky Linux 9 are renowned for their stability and reliability in enterprise-grade Linux distributions. Despite their predominant use in server environments, there are instances where implementing a graphical user interface (GUI) proves beneficial, particularly for remote server management.
This guide presents a detailed walkthrough of installing a GUI desktop environment and XRDP (X Remote Desktop Protocol) on AlmaLinux 9 and Rocky Linux 9. Enabling a GUI on your server enhances user experience, facilitating tasks that necessitate graphical interfaces.
Beginning with system updates and GNOME desktop environment installation, the guide progresses to configuring XRDP for remote access and adjusting firewall settings. Upon completion, you'll have a fully operational GUI on your server, accessible remotely through an RDP client.
Let's dive into the installation process and empower your Linux server with a user-friendly GUI interface.
Step 1: Update the System
Before installing any new packages, it's essential to update the system's package repositories and installed packages:
# yum update
or
# dnf update
Input yum update
command.
![GUILinux1](https://www.layerstack.com/img/docs/resources/GUILinux1.png)
Input dnf update
command.
![GUILinux2](https://www.layerstack.com/img/docs/resources/GUILinux2.png)
Step 2: Install GUI Desktop Environment
AlmaLinux 9 and Rocky Linux 9 offer multiple desktop environments. For this guide, we'll install the GNOME desktop environment:
# yum groupinstall "Server with GUI"
or
# dnf groupinstall "Server with GUI"
Input yum groupinstall "Server with GUI"
command.
![GUILinux3](https://www.layerstack.com/img/docs/resources/GUILinux3.png)
Input dnf groupinstall "Server with GUI"
command.
![GUILinux4](https://www.layerstack.com/img/docs/resources/GUILinux4.png)
Step 3: Enable GUI at Boot
Set the system to boot into graphical mode by default:
# systemctl set-default graphical.target
![GUILinux5](https://www.layerstack.com/img/docs/resources/GUILinux5.png)
Step 4: Install EPEL Repository (Extra Packages for Enterprise Linux)
The EPEL repository provides additional packages that are not included in the base repositories. Install the epel-release package.
# yum install epel-release
or
# dnf install epel-release
Input yum install epel-release
command.
![GUILinux6](https://www.layerstack.com/img/docs/resources/GUILinux6.png)
Input dnf install epel-release
command.
![GUILinux7](https://www.layerstack.com/img/docs/resources/GUILinux7.png)
Step 5: Install XRDP
XRDP is a protocol that allows you to remotely connect to the Linux GUI. Install the XRDP package:
# yum install xrdp
or
# dnf install xrdp
Input yum install xrdp
command.
![GUILinux8](https://www.layerstack.com/img/docs/resources/GUILinux8.png)
Input dnf install xrdp
command.
![GUILinux9](https://www.layerstack.com/img/docs/resources/GUILinux9.png)
Step 6: Start and Enable XRDP Service
After installation, start the XRDP service and enable it to start automatically at boot.
# systemctl start xrdp
# systemctl enable xrdp
![GUILinux10](https://www.layerstack.com/img/docs/resources/GUILinux10.png)
Step 7: Configure Firewall
If using the default firewall (firewalld), allow traffic on the XRDP port (3389). Skip this step if firewalld is disabled.
# firewall-cmd --add-port=3389/tcp --permanent
# firewall-cmd --reload
![GUILinux11](https://www.layerstack.com/img/docs/resources/GUILinux11.png)
*Once all the steps are completed, reboot
the cloud server once.
Step 8: Access the cloud server using Remote Desktop Connection Protocol (RDP)
Right now can use an RDP client (*For example: Remote Desktop Connection on Windows or Remmina on Linux) to connect to the server using its IP address or hostname.
On the local computer (Windows), open the remote application by searching for Remote Desktop Connection
in the Start menu and then enter the server's IP address.
![GUILinux12](https://www.layerstack.com/img/docs/resources/GUILinux12.png)
Enter the root credentials to Log in here.
![GUILinux13](https://www.layerstack.com/img/docs/resources/GUILinux13.png)
Once the valid credentials have been entered, the RDP connection is established, and the user will be shown the newly installed GUI on the cloud server.
Fig 1. Shows Rocky Linux 9 GUI:
![GUILinux14](https://www.layerstack.com/img/docs/resources/GUILinux14.png)
Fig 2. Shows AlmaLinux 9 GUI:
![GUILinux15](https://www.layerstack.com/img/docs/resources/GUILinux15.png)
Conclusion
The installation of GUI and XRDP on AlmaLinux 9 and Rocky Linux 9 provides users with a seamless transition to a graphical user interface environment, enhancing accessibility and ease of use. By following the step-by-step guide outlined above, users can effectively set up their systems for remote desktop access, allowing for efficient management and utilization of resources. Whether for personal or professional use, this installation process empowers users to harness the full potential of their operating systems, ensuring a productive and user-friendly computing experience.
Related Tutorials