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.

More in This Category
Rocky Linux Administration Memo: Essential Commands and Configuration Notes

Rocky Linux Administration Memo: Essential Commands and Configuration Notes

A practical Rocky Linux administration reference covering packages, services, networking, storage, security controls, logs, and frequently used maintenance commands.

How to Install a GUI and Remote Desktop on Rocky Linux

How to Install a GUI and Remote Desktop on Rocky Linux

Install a graphical desktop on Rocky Linux, select the graphical boot target, configure remote access, and review firewall and security considerations.

How to Change the Hostname on Rocky Linux

How to Change the Hostname on Rocky Linux

Learn how to change a Rocky Linux hostname with hostnamectl, verify the persistent setting, and check name resolution and services afterward.

How to List Installed Packages on Rocky Linux

How to List Installed Packages on Rocky Linux

Use DNF and RPM to list, search, count, and inspect installed packages on Rocky Linux and identify which package owns a file.

How to Use DNF on Rocky Linux: Packages, Repositories, and Updates

How to Use DNF on Rocky Linux: Packages, Repositories, and Updates

Use DNF on Rocky Linux to search, install, remove, update, and inspect packages and repositories while keeping package-management changes controlled.

How to Install MariaDB on Rocky Linux

How to Install MariaDB on Rocky Linux

Install MariaDB on Rocky Linux, enable the database service, complete the initial security setup, create a database and account, and verify access.

How to Configure a Static IP Address on Rocky Linux

How to Configure a Static IP Address on Rocky Linux

Configure and verify a static IPv4 address on Rocky Linux with NetworkManager, including the gateway, DNS servers, connection profile, and safe remote-change checks.

How to Configure Root SSH Login on Rocky Linux Safely

How to Configure Root SSH Login on Rocky Linux Safely

Review how root SSH login is controlled on Rocky Linux, why direct root access is risky, and how to change and verify sshd settings without losing remote access.

How to Install PostgreSQL on Rocky Linux

How to Install PostgreSQL on Rocky Linux

Install PostgreSQL on Rocky Linux, initialize the database cluster, enable the service, create a database and user, and review network and authentication settings.

How to Change the System Language and Locale on Rocky Linux

How to Change the System Language and Locale on Rocky Linux

Learn how to check and change the system-wide language and locale on Rocky Linux with localectl and glibc language packs. This guide also explains session-only changes, LANG and LC_* precedence, and troubleshooting for broken Korean characters.