How to Install a GUI and Remote Desktop on Rocky Linux
To add a GNOME graphical environment to a Rocky Linux server, first check the installable environment groups, then install the Server with GUI group and change the default systemd target to graphical.target. The remote desktop method varies depending on the Rocky Linux version, and you should not apply the XRDP procedure for Rocky Linux 8/9 directly to Rocky Linux 10.
Things to check before installation
cat /etc/rocky-release free -h df -h / systemctl get-default
The GUI significantly increases memory, storage space, and update targets. If you only need server management, first consider whether Cockpit or SSH is sufficient. For virtual machines, you also need to check graphical memory and console devices.
Installing the GNOME desktop environment
Check available environment groups
dnf group list --hidden
Group names and command syntax may vary depending on your Rocky Linux and DNF versions. Use the exact environment names shown in the list.
Installing Server with GUI
sudo dnf group install 'Server with GUI'
Review the packages to be installed and the download size before proceeding. If the repository configuration has changed or there are package conflicts, do not attach --allowerasing indiscriminately; check the cause first.
Change the default boot target to GUI
sudo systemctl set-default graphical.target systemctl get-default
To use the graphical login screen after rebooting, reboot as follows.
sudo systemctl reboot
You can also switch immediately using systemctl isolate graphical.target, but this may affect current tasks and sessions, so in a remote operation environment, it is safer to plan a reboot and prepare a recovery console.
Checking graphical login issues
systemctl status display-manager systemctl status gdm journalctl -b -u gdm --no-pager
If you encounter a black screen or repeated login issues, check the graphics device, virtual machine drivers, Wayland/X11 support, user home directory permissions, and logs. If the server does not boot, you can enter the text target from the boot menu and revert the default target.
sudo systemctl set-default multi-user.target
Using XRDP on Rocky Linux 8/9
Check the version and repository
XRDP is provided by the EPEL repository. On Rocky Linux 9, CRB may be needed, and on Rocky Linux 8, PowerTools may provide required dependencies.
sudo dnf install dnf-plugins-core sudo dnf config-manager --set-enabled crb sudo dnf install epel-release
The above crb is an example for Rocky Linux 9. Rocky Linux 8 uses powertools, and XRDP is not suitable for Rocky Linux 10.
Installing and Enabling XRDP Service
sudo dnf install xrdp sudo systemctl enable --now xrdp systemctl status xrdp
For the XRDP procedure on Rocky Linux, you can refer to the official Rocky Linux RDP guide.
Opening the Firewall Restrictively
If possible, use a VPN or a management network and allow access to 3389/tcp only from specific management PCs.
sudo firewall-cmd --zone=public --add-rich-rule='rule family="ipv4" source address="192.0.2.10/32" port port="3389" protocol="tcp" accept' sudo firewall-cmd --runtime-to-permanent
Do not expose the RDP port directly to the entire internet. Replace the example address in the document with the actual management source address, and restrict the cloud security group to the same range.
Remote Desktop on Rocky Linux 10
Rocky Linux 10 uses Wayland by default and does not provide XRDP, which depends on X11 packages. You should use GNOME's built-in remote desktop feature, gnome-remote-desktop, and configure desktop sharing or remote login in the graphical settings screen.
Changes in Rocky Linux 10 can be found in the Rocky Linux 10 Release Notes. If dnf install xrdp is in the existing Rocky Linux 8/9 automation, add a version condition.
Remote Desktop Security Check
- Log in with a separate user account that is not root.
- Allow the RDP port only from VPN or specific management source addresses.
- Review the strength of passwords and whether account lockout and MFA are supported.
- Regularly update the server and Remote Desktop components.
- Set policies for screen locking, idle session termination, and clipboard sharing of sensitive information.
- Check for potential conflicts between local GNOME sessions and remote sessions using the same account.
Frequently Asked Questions
Does installing a GUI significantly reduce server performance?
GNOME and graphical services additionally use memory, CPU, and disk. On a small VM or dedicated server, compare the required management features with the resource cost.
Cannot find the xrdp package on Rocky Linux 10
Rocky Linux 10 does not support X11, so the X11-dependent XRDP package is not provided. Use the built-in RDP feature of GNOME.
A black screen appears when connecting remotely
Check the Rocky version, display server, local session of the same account, home directory permissions, and xrdp or GNOME remote desktop logs. Also ensure that you haven't applied a guide that doesn't match your version.
How do I disable the GUI again?
If you change the default boot target to multi-user.target, the system will use the text environment from the next boot. Removing packages can also delete dependencies, so review the transaction list carefully.
Summary
By installing the GNOME environment group and setting graphical.target as the default, you can boot Rocky Linux into a graphical environment. Configure remote desktop based on XRDP for Rocky Linux 8/9 and built-in GNOME RDP for Rocky Linux 10.
Do not open the remote GUI port to the entire internet; restrict it to a VPN or specific management address, and it is important to first check the display server and package differences by version.









