Installing the lightweight XFCE desktop environment on Rocky Linux provides a fast, resource-friendly graphical interface ideal for older hardware or systems where performance is a priority. XFCE offers a clean and customizable desktop experience without the heavy resource demands of alternatives like GNOME or KDE. This guide walks you through the process of installing XFCE on Rocky Linux, ensuring you can quickly get a graphical user interface (GUI) up and running.
What You’ll Need
- A running Rocky Linux 8 or 9 installation with root or sudo access.
- An active internet connection to download packages.
- Basic familiarity with terminal commands and system administration.
Step-by-Step
- Update your system packages: Before installing anything, update your system’s package index and upgrade existing packages to their latest versions. Open a terminal and run:
sudo dnf update -y
- Install the EPEL repository: XFCE packages are available from the Extra Packages for Enterprise Linux (EPEL) repository, which is not enabled by default. To enable it, execute:
sudo dnf install epel-release -y
This ensures you have access to a wider range of packages, including XFCE components.
- Install the XFCE desktop environment group: Rocky Linux provides environment groups to simplify package installation. To install XFCE, run:
sudo dnf groupinstall "Xfce Desktop" -y
This command installs the core XFCE desktop environment and essential utilities.
- Set the graphical target as default: To boot into the XFCE graphical interface by default, set the systemd target to graphical:
sudo systemctl set-default graphical.target
- Enable and start the display manager: Rocky Linux 8 and 9 use GDM by default with GNOME, but since XFCE works well with LightDM (a lightweight display manager), you should install and enable it:
sudo dnf install lightdm -y sudo systemctl disable gdm sudo systemctl enable lightdm sudo systemctl start lightdm
This switches the graphical login manager to LightDM, which integrates smoothly with XFCE.
- Reboot the system: Restart your machine to load the new desktop environment and display manager:
sudo reboot
- Log in to XFCE: After reboot, LightDM will prompt for user credentials. Log in normally. If you see a session option, select “XFCE Session” before logging in to ensure the XFCE environment loads.
- Customize and update XFCE: Once logged in, you can tailor XFCE’s appearance and behavior through its Settings Manager. It’s also a good idea to update your system again to ensure all XFCE-related packages are current:
sudo dnf update -y
Common Mistakes
- Not enabling EPEL repository: XFCE packages are not included in the default Rocky Linux repositories. Skipping the installation of
epel-releasewill cause package not found errors. - Forgetting to switch display managers: Rocky Linux defaults to GDM, which is optimized for GNOME. If you don’t install and enable LightDM (or another compatible display manager), XFCE might not start properly.
- Not setting graphical target: Failing to set the system to boot into graphical mode will leave you at the command line after reboot.
- Ignoring session selection at login: If multiple desktop environments are installed, forgetting to pick XFCE at the login screen can result in loading the wrong GUI.
- Running commands without sudo/root: Most installation and configuration commands require elevated privileges; omitting
sudoor root access will cause failures.
Tips
- Use LightDM greeter themes: You can customize the LightDM login screen appearance by installing different greeter themes. For example, install
lightdm-gtkfor a clean GTK-based greeter.sudo dnf install lightdm-gtk -y
- Optimize XFCE for performance: Disable unnecessary startup applications via the Session and Startup settings to keep the desktop lightweight.
- Install additional XFCE utilities: To enhance your experience, consider installing tools like
xfce4-goodies, which includes extra plugins and utilities:sudo dnf install xfce4-goodies -y
- Switch back to CLI if needed: If you want to temporarily boot into the command line (multi-user target), use:
sudo systemctl set-default multi-user.target
- Keep your system updated: Regularly update to get security patches and bug fixes for both Rocky Linux and XFCE components.
Troubleshooting
If the installation does not go as planned, here are some common issues and solutions:
- XFCE desktop does not start after login: Double-check that LightDM is enabled and running. Use
systemctl status lightdmto verify. If GDM is still active, disable it withsudo systemctl disable gdmand enable LightDM again. - Missing packages or errors during installation: Confirm that the EPEL repository is enabled and reachable by running
dnf repolist. If it’s missing, reinstall it withsudo dnf install epel-release. Network connectivity issues can also cause package retrieval failures. - Black screen or graphical issues after reboot: This can be caused by driver problems or conflicts between display managers. Try switching back to GDM temporarily using:
sudo systemctl disable lightdm sudo systemctl enable gdm sudo reboot
Then troubleshoot graphics drivers or reinstall LightDM.
- Login loop or session fails to load: Check the ownership and permissions of your home directory and configuration files. Sometimes corrupted XFCE configs cause login loops. You can reset XFCE settings by removing or renaming the
.config/xfce4directory in your home folder:mv ~/.config/xfce4 ~/.config/xfce4.bak
- Unable to switch desktop sessions: Ensure that the session files for XFCE exist in
/usr/share/xsessions/. If missing, reinstall the XFCE group.
Frequently Asked Questions
- Can I install XFCE alongside GNOME on Rocky Linux?
- Yes, you can install multiple desktop environments side-by-side. Just make sure to select the desired session at login.
- Is XFCE suitable for modern hardware?
- Absolutely. XFCE works well on both older and modern machines, providing a lightweight yet fully functional desktop.
- How do I switch back to GNOME if I want?
- Enable GDM again and disable LightDM:
sudo systemctl disable lightdm sudo systemctl enable gdm sudo reboot
- Does installing XFCE remove GNOME or other desktops?
- No, installing XFCE does not remove other desktop environments unless you specifically uninstall them.
- Why do I need to install EPEL for XFCE?
- XFCE packages are part of the EPEL repository, which provides additional software not included in the default Rocky Linux repos.
- Can I install XFCE without a display manager?
- Yes, but you would need to start the X server and XFCE manually from the command line, which is less convenient for most users.
By following this guide, you can install and run the lightweight XFCE desktop environment on Rocky Linux, providing a fast, efficient graphical interface suited to a wide range of hardware. Whether you are upgrading an older system or just want a simpler desktop experience, XFCE is a great choice that balances functionality with performance.
Related
- How to Get Rid of Sugar Ants Naturally: Effective Step-by-Step Guide
- How to Identify Sugar Ants: Step-by-Step Guide with Pictures
- How to Track Your College Refund Status Quickly and Easily