How to Install Xfce on Ubuntu 24.04, 22.04, or 20.04

The Xfce Desktop Environment is a lightweight, fast, and highly customizable alternative to Ubuntu’s default GNOME Desktop Environment. Known for its simplicity and low resource usage, Xfce provides a traditional desktop experience with a focus on speed and ease of use. It is an excellent choice for users who prefer a more straightforward interface or who need to optimize performance on older hardware. Xfce can be installed alongside the GNOME Desktop on Ubuntu, giving you the flexibility to switch between desktop environments based on your preferences.

On Ubuntu 24.04, 22.04, or 20.04, Xfce can be installed via the Ubuntu default repository using the command-line terminal. This method ensures that you have access to the latest stable version of Xfce, integrated seamlessly with the Ubuntu system. This guide will walk you through the steps to install Xfce alongside GNOME, providing you with an additional desktop environment option.

Update Ubuntu Before Xfce Installation

Ensure your system is up-to-date before starting the installation process. Open a terminal and run the following command.

sudo apt update && sudo apt upgrade

Install Xfce via APT Command

The next step is to install the Xfce desktop environment on Ubuntu. Run the following command in the terminal:

sudo apt install xfce4 xfce4-goodies

Once you have installed the Xfce desktop environment, the final step is to restart your system. This can be quickly done by entering the following command into your terminal.

reboot

Log in to the XFCE Desktop Environment

After restarting your desktop, you’ll be brought to the login screen. Before logging in, you must switch to the Xfce desktop environment. To do this, click on the settings icon in the top right corner of the screen and select “Xfce Session” instead of the default “Ubuntu (Default).”

Now that you’ve successfully installed the Xfce desktop environment on Ubuntu, it’s time to explore its unique features. Upon logging in, you’ll immediately notice several visual changes, including a color scheme and background change. Despite its lightweight design, Xfce offers a sleek and modern user interface.

Managing XFCE

Updating XFCE and Associated Packages

The importance of keeping your system updated cannot be overstated. Regular updates bring new features, patch security vulnerabilities, and improve performance. The XFCE desktop environment is part of this update cycle. To initiate the update, you’ll need to use apt commands.

First, execute the following command to refresh your package list:

sudo apt update

This command fetches the latest package metadata from the repositories, ensuring you know the most recent versions.

If the system finds any updates during the refresh, run the following command to upgrade your installed packages:

sudo apt upgrade

This command downloads and installs the latest versions of the packages you have on your system, including XFCE. It ensures that your desktop environment stays up-to-date with the latest bug fixes and security patches.

Switching Between Display Managers

XFCE generally employs LightDM as its default display manager. However, if you switch to another desktop environment like GNOME, you may prefer using GDM3. Changing the display manager is straightforward.

Execute the following command to start the reconfiguration:

sudo dpkg-reconfigure lightdm

After running this command, a prompt will appear, allowing you to select your desired display manager. Ensure to reboot your system for the changes, as the display manager only switches during the boot process.

Removing XFCE from Ubuntu Linux

There could be scenarios where you want to remove XFCE from your system—maybe you wish to try out a different desktop environment, or perhaps you want to revert to a previous setup. To altogether remove XFCE and its related files, execute the following command:

sudo apt autoremove '^xfce' --purge

This command eliminates XFCE and any associated files, reverting your desktop environment to its previous state.

If you plan to reinstall the GNOME Desktop Environment after removing XFCE, you’ll need to refresh your package list and reinstall the necessary packages as follows:

sudo apt update
sudo apt install gnome gdm3 task-gnome-desktop --reinstall

Before rebooting, ensure that GDM3 is set as the active display manager. If you overlook this step, you may find yourself in a terminal or text-based login interface. To avoid this, activate GDM3 by executing:

To finalize all changes, a system reboot is necessary:

sudo reboot

This action will reboot your system, thereby implementing all your changes.

Conclusion

By installing the Xfce Desktop Environment alongside Ubuntu’s default GNOME Desktop, you gain a lightweight and efficient alternative that can improve system performance, particularly on older hardware. The installation process via the Ubuntu default repository is straightforward, and once installed, you can easily switch between GNOME and Xfce at the login screen. This flexibility allows you to enjoy the benefits of both desktop environments on a single Ubuntu installation, providing a customizable and versatile computing experience.

Useful Links

Here are some useful links related to using XFCE:

  • XFCE Official Website: Visit the website for information about the desktop environment, features, and download options.
  • XFCE Wiki: Access the XFCE Wiki for comprehensive documentation, tutorials, and user guides.
  • XFCE Documentation: Explore detailed documentation for using and configuring XFCE.
  • XFCE Forum: Join the XFCE forum to discuss issues, share solutions, and get support from the community.
  • XFCE GitLab Repository: Visit the XFCE GitLab repository to view the source code, report issues, and contribute to the development.

Leave a Comment