dotlinux blog

How to Install XFCE Desktop in RHEL, Rocky Linux & AlmaLinux

XFCE is a lightweight and user-friendly desktop environment that offers a great balance between functionality and resource usage. It takes up only a small fraction of the CPU and memory compared to heavier alternatives like GNOME and KDE, making it ideal for older hardware or servers where you want to conserve resources for other processes.

In this guide, we will walk you through the process of installing XFCE on RHEL (Red Hat Enterprise Linux), Rocky Linux, and AlmaLinux. The instructions cover versions 8 and 9 of these distributions.

Note: XFCE is not currently available in EPEL for RHEL 10, Rocky Linux 10, or AlmaLinux 10. If you are running version 10, consider using GNOME or KDE instead.

Last Updated: 2026-03

Table of Contents#

  1. Prerequisites
  2. Updating the System
  3. Installing XFCE Desktop
  4. Configuring the Display Manager
  5. Logging into XFCE Desktop
  6. Customizing XFCE Desktop
  7. Troubleshooting
  8. FAQ
  9. Conclusion
  10. References

1. Prerequisites#

Before we begin the installation process, make sure you have the following:

  • A system running RHEL 8/9, Rocky Linux 8/9, or AlmaLinux 8/9.
  • Sudo or root privileges to install packages.
  • An active internet connection to download packages from the EPEL repository.
  • At least 2 GB of free disk space for the XFCE desktop and its dependencies.

2. Updating the System#

It is always a good practice to update your system before installing new software. Open a terminal and run the following command:

sudo dnf update -y

This will update all the installed packages on your system to their latest versions.

3. Installing XFCE Desktop#

XFCE is not available in the default RHEL-based repositories. You need to enable the EPEL (Extra Packages for Enterprise Linux) repository first.

Step 3.1: Enable Required Repositories#

Install the EPEL repository:

sudo dnf install epel-release -y

For RHEL 9 and derivatives (Rocky Linux 9, AlmaLinux 9): You also need to enable the CRB (Code Ready Builder) repository, which provides build dependencies required by some EPEL packages:

# On RHEL 9:
sudo subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms
 
# On Rocky Linux 9:
sudo /usr/bin/crb enable
 
# On AlmaLinux 9:
sudo dnf config-manager --set-enabled crb

For RHEL 8 and derivatives (Rocky Linux 8, AlmaLinux 8): Enable the PowerTools repository instead:

# On RHEL 8:
sudo subscription-manager repos --enable codeready-builder-for-rhel-8-$(arch)-rpms
 
# On Rocky Linux 8:
sudo dnf config-manager --set-enabled powertools
 
# On AlmaLinux 8:
sudo dnf config-manager --set-enabled powertools

Step 3.2: Verify XFCE Package Availability#

Confirm that the XFCE package group is available in the EPEL repository:

sudo dnf group list | grep -i xfce

You should see Xfce in the output.

Step 3.3: Install XFCE#

Now install the XFCE desktop environment along with the X Window System base packages:

sudo dnf groupinstall "Xfce" "base-x" -y

The "base-x" group provides essential X server components needed for the graphical desktop to function properly.

4. Configuring the Display Manager#

Once XFCE is installed, you need to configure a display manager to handle the graphical login screen. There are several options available: GDM (GNOME Display Manager), LightDM, and SDDM.

GDM is typically pre-installed on RHEL-based systems with GNOME. If it is not installed, you can install it:

sudo dnf install gdm -y

Enable GDM to start at boot:

sudo systemctl enable gdm

Option B: Using LightDM (Lightweight Alternative)#

LightDM is a lighter display manager that pairs well with XFCE. It is available in the EPEL repository:

sudo dnf install lightdm -y

Disable GDM if it is currently enabled, then enable LightDM:

sudo systemctl disable gdm 2>/dev/null
sudo systemctl enable lightdm

Setting the Default Graphical Target#

Ensure the system boots into the graphical interface:

sudo systemctl set-default graphical.target

5. Logging into XFCE Desktop#

Reboot your system to apply the changes:

sudo reboot

After the system reboots, you should see the display manager login screen. Enter your username and password, then select "Xfce Session" from the session dropdown menu (usually a gear icon near the login button). Click "Login" or press Enter to start using the XFCE desktop.

Tip: If XFCE does not appear as an option in the session dropdown, verify that the XFCE packages were installed correctly by running sudo dnf group list | grep -i xfce.

6. Customizing XFCE Desktop#

XFCE offers a wide range of customization options to personalize your desktop experience.

Changing the Theme#

You can change the appearance theme by navigating to Settings > Appearance > Style. Select a theme from the list, or install additional themes:

sudo dnf install arc-theme numix-gtk-theme -y

After installation, the new themes will appear in the Appearance settings.

Customizing the Panel#

The XFCE panel is highly customizable. Right-click on the panel and select "Panel > Panel Preferences" to change its size, position, and appearance. You can also add or remove panel items from the "Items" tab.

Installing Plugins#

XFCE has a variety of plugins available to extend its functionality. Install some popular plugins:

sudo dnf install xfce4-weather-plugin xfce4-whiskermenu-plugin xfce4-pulseaudio-plugin -y

After installing plugins, right-click the panel, select "Panel > Add New Items", and choose the plugin you want to add.

Setting a Wallpaper#

Right-click on the desktop and select "Desktop Settings" to change the wallpaper and adjust icon appearance.

File Manager Configuration#

XFCE uses Thunar as its default file manager. You can install additional features:

sudo dnf install thunar-archive-plugin thunar-volman -y

7. Troubleshooting#

If you encounter issues during or after installation, here are some common solutions.

XFCE Not Appearing in Session List#

If XFCE does not show up as an option at the login screen:

# Verify XFCE is installed
sudo dnf group list | grep -i xfce
 
# Reinstall if necessary
sudo dnf groupinstall "Xfce" "base-x" -y

Black Screen After Login#

This can occur if there is a conflict with an existing display manager:

# Disable conflicting display managers
sudo systemctl disable gdm
sudo systemctl disable sddm
 
# Enable only LightDM or GDM
sudo systemctl enable lightdm  # or gdm
 
sudo reboot

Missing Dependencies#

Check for missing package dependencies:

sudo dnf check

If there are missing dependencies, install them:

sudo dnf distro-sync -y

Reinstalling XFCE#

If all else fails, you can remove and reinstall XFCE:

sudo dnf groupremove "Xfce" -y
sudo dnf groupinstall "Xfce" "base-x" -y

Display Manager Not Starting#

If the graphical login screen does not appear after reboot:

# Check the status of the display manager
systemctl status gdm   # or lightdm
 
# View logs for errors
journalctl -u gdm --since "10 minutes ago"  # or lightdm

8. FAQ#

Is XFCE lighter than GNOME?#

Yes. XFCE uses significantly less RAM and CPU than GNOME, making it a good choice for older or resource-constrained systems. Typical XFCE installations use around 300–400 MB of RAM at idle, compared to 800 MB or more for GNOME.

Can I use XFCE alongside GNOME?#

Yes. You can install XFCE on a system that already has GNOME installed. At the login screen, you can choose which desktop environment to use for each session.

Does XFCE support Wayland?#

As of XFCE 4.20 (released in December 2024), XFCE has experimental Wayland support. However, on RHEL-based distributions, XFCE still runs on X11 by default. Full Wayland support is expected in a future release.

Why do I need the EPEL repository?#

The EPEL (Extra Packages for Enterprise Linux) repository provides additional software packages that are not included in the default RHEL-based repositories. XFCE and its dependencies are maintained in EPEL.

Can I install XFCE on a minimal server installation?#

Yes. After installing XFCE, configure the system to boot into graphical mode:

sudo systemctl set-default graphical.target

Then add exec /usr/bin/xfce4-session to your ~/.xinitrc file if you are using startx:

echo "exec /usr/bin/xfce4-session" >> ~/.xinitrc

9. Conclusion#

In this guide, we covered how to install the XFCE desktop environment on RHEL, Rocky Linux, and AlmaLinux (versions 8 and 9). We walked through enabling the required repositories, installing XFCE, configuring a display manager, logging in, customizing the desktop, and troubleshooting common issues.

XFCE is an excellent choice when you need a lightweight, stable, and customizable desktop environment that does not consume excessive system resources. It is particularly well-suited for servers, virtual machines, and older hardware.

10. References#