Mets Minor League Blog

Music theory, instruments and musicians

Mets Minor League Blog

Music theory, instruments and musicians

How to Setup XFCE Desktop Without GUI Installer on RHEL

How to Setup XFCE Desktop Without GUI Installer on RHEL

Setting up the XFCE desktop environment on a Red Hat Enterprise Linux (RHEL) system without using a graphical installer allows you to add a lightweight, user-friendly desktop to a server or minimal installation. This approach is ideal for systems where you want a graphical interface but have only command-line access initially, or when you prefer to avoid the overhead of a full GNOME or KDE desktop environment. By following this guide, you will install and configure XFCE from the terminal, enabling a responsive and resource-efficient desktop experience on RHEL.

What You’ll Need

  • A RHEL system with network access (version 7, 8, or 9 supported)
  • Root or sudo privileges
  • Basic familiarity with the Linux command line
  • Configured RHEL subscription or access to repositories

Step-by-Step

  1. Update Your System
    Before starting, ensure your system packages are up to date:
    sudo dnf update -y (or yum on RHEL 7)
  2. Enable Required Repositories
    XFCE packages are typically available in the standard RHEL repositories, but you may need to enable EPEL (Extra Packages for Enterprise Linux) for some dependencies:
    sudo dnf install epel-release -y
  3. Install the X Window System
    XFCE requires the X server and related components. Install them with:
    sudo dnf groupinstall "Server with GUI" -y
    Or, if you want a minimal X setup:
    sudo dnf groupinstall "X Window System" -y
  4. Install XFCE Desktop Environment
    Install XFCE and related packages:
    sudo dnf groupinstall "Xfce Desktop" -y
    If this group is not available, install core packages manually:
    sudo dnf install @xfce-desktop-environment -y or
    sudo dnf install xfce4 xfce4-goodies -y
  5. Install a Display Manager
    To log into XFCE graphically, you need a display manager. LightDM is a lightweight choice often used with XFCE:
    sudo dnf install lightdm lightdm-gtk -y
    Alternatively, GDM or SDDM can be used, but LightDM matches XFCE’s lightweight profile.
  6. Enable and Start the Display Manager
    Enable LightDM to start on boot:
    sudo systemctl enable lightdm
    Start it immediately:
    sudo systemctl start lightdm
  7. Set the Default Target to Graphical
    Ensure the system boots into the graphical target:
    sudo systemctl set-default graphical.target
  8. Reboot the System
    Restart your system to load the graphical interface:
    sudo reboot
  9. Log in to XFCE
    At the LightDM login screen, select XFCE as the session if not selected by default. Enter your credentials to start your XFCE desktop.
  10. Configure XFCE (Optional)
    Once logged in, customize XFCE settings such as panel layout, themes, and startup applications via the Settings Manager.

Common Mistakes

  • Not enabling required repositories: Missing the EPEL repository can cause package installation failures.
  • Skipping the X Window System installation: XFCE needs Xorg; without it, the desktop won’t start.
  • Not setting the default target to graphical: The system may boot into text mode instead of launching the GUI.
  • Failing to enable or start the display manager: Without a running display manager, graphical login won’t be possible.
  • Using incompatible display managers: Some display managers may not work well with XFCE or require additional configuration.

Tips

  • Use LightDM for a lightweight login experience: It integrates well with XFCE and consumes minimal resources.
  • Check for group names and package availability: RHEL versions may differ slightly in group names; use dnf grouplist to verify.
  • Install additional XFCE goodies: The xfce4-goodies package provides extra utilities and plugins to enhance your desktop.
  • Configure firewall if needed: If using remote X sessions, ensure firewall rules allow necessary traffic.
  • Use startx for testing: If you want to test XFCE without a display manager, install xorg-x11-xinit and run startx after setting up ~/.xinitrc.

Troubleshooting

If the graphical desktop does not start or XFCE fails to load, consider the following steps:

  • Check Display Manager Status:
    Run systemctl status lightdm to see if it is active and enabled. Restart it with sudo systemctl restart lightdm if necessary.
  • Verify Xorg Installation:
    Ensure X server is installed correctly with rpm -q xorg-x11-server-Xorg. Reinstall if missing.
  • Review Log Files:
    Look at /var/log/Xorg.0.log and /var/log/lightdm/lightdm.log for errors that can indicate driver or configuration problems.
  • Check User Session Files:
    Make sure the user’s session is set to XFCE. The display manager session selector or the ~/.Xclients or ~/.xinitrc files should specify startxfce4.
  • Inspect SELinux and Firewall:
    Sometimes SELinux policies or firewall settings can block GUI startup. Temporarily set SELinux to permissive mode (sudo setenforce 0) to test.
  • Confirm Package Integrity:
    Run sudo dnf clean all and sudo dnf reinstall @xfce-desktop-environment to fix corrupted packages.
  • Test with startx:
    If the display manager still fails, log in on the console and try startx to manually start XFCE. This can help isolate the issue.

Frequently Asked Questions

Can I install XFCE on RHEL without a subscription?
Yes, but you will need access to repositories like EPEL and possibly CentOS or Fedora mirrors to get XFCE packages, as RHEL’s official repos require subscription.
Is XFCE lighter than GNOME or KDE on RHEL?
Yes, XFCE is known for being a lightweight desktop environment, making it ideal for systems with limited resources or for users preferring simplicity.
How do I switch back to the command line if I want to stop the GUI?
You can switch to a text console with Ctrl+Alt+F3 (or other F-keys), or disable the graphical target with sudo systemctl set-default multi-user.target.
Can I use a different display manager with XFCE?
Yes. While LightDM is recommended for XFCE, GDM, SDDM, and others can work. Just ensure they are installed, enabled, and configured properly.
How do I update XFCE once installed?
Use your package manager with sudo dnf update to keep XFCE and related packages current.
What if my graphics hardware is not supported?
XFCE uses Xorg, so ensure appropriate drivers are installed. For proprietary drivers, check vendor support or fallback to open-source drivers.

By following these instructions, you can successfully add a lightweight XFCE desktop environment to your RHEL system without relying on a graphical installer. This setup is efficient for servers, virtual machines, or minimal installations where you prefer a simple yet functional graphical interface. Remember to verify your repository access and package availability based on your specific RHEL version and subscription status.

For further customization, explore XFCE’s settings manager to tailor the desktop to your workflow, and consider installing additional utilities from the xfce4-goodies package to enhance your experience.

Related

How to Setup XFCE Desktop Without GUI Installer on RHEL
Scroll to top