Unsatisfied with the numerous desktop environments you’ve tried?
If you’re using Debian 12 Bookworm and in search of a less resource-intensive desktop environment with a highly productive user experience, then Xfce stands as one of the best choices.
This guide will walk you step-by-step on how to install Xfce on Debian 12 Bookworm.
Let’s dive right in!
Xfce Vs. Other Debian Desktop Environments
The main reason for considering Xfce is that it balances functionality and conserves system resources. As a result, it soon turned into a popular choice among many Debian users.
Here’s why Xfce stands out from other Debian desktop environments:
- It’s lightweight and runs efficiently even on older hardware
- The user interface is clean, attractive, and highly customizable
- Xfce offers a traditional UNIX/Linux desktop feel, making it comfortable for long-time users
- It is well-documented and backed by a reliable community for support
What You’ll Need
Before you proceed with the steps below, ensure that you have the following prerequisites before proceeding with the installation of Xfce:
- A functioning Debian 12 Bookworm system (guide)
- Sufficient system resources (CPU, RAM) to run Xfce (guide)
- A user account with sudo privileges (guide)
- Stable Internet connection to download packages
- Basic familiarity with terminal commands (guide)
If you have all the above requirements, continue reading to install the Xfce desktop environment of Debian 12 using the steps below.
How to Install Xfce on Debian 12: 4 Steps
Step 1: Update and Upgrade Debian 12 Bookworm
Updating and upgrading Debian 12 Bookworm is necessary while installing new software or packages.
Here are steps on how to do so:
sudo apt update
- Next, we will proceed to install these updated packages on your Debian system. Enter the following command to begin upgrading:
sudo apt upgrade
Using both these commands, you can maintain your system up to date and avoid potential issues while installing new desktop environments like Xfce.
Note: You might be prompted to confirm the update or upgrade operation when you run these commands. When prompted, enter ‘Y‘ to proceed. If you don’t encounter any prompt, it’s a good sign that your device is already in its most updated and upgraded state.
Step 2: Install Tasksel
By installing Tasksel on your device, you can simplify the process of installing major applications and environments, as it can install multiple related packages as a coordinated “task” onto your system.
- Enter the following command to install Tasksel on Debian 12:
sudo apt install tasksel -y
Step 3: Install XFCE Desktop Environment
We will now proceed to install the XFCE desktop environment.
As you proceed with the installation of XFCE, you will come across a configuration screen for the LightDM display manager. LightDM is a free and open-source X display manager that aims to be lightweight, fast, extensible, and multi-desktop.
Let’s now jump into the steps to install XFCE on your Debian system:
sudo tasksel install xfce-desktop
- Since we have chosen XFCE as the default desktop environment, it is recommended to select LightDM during this configuration step, as it can seamlessly manage your start-up process by providing a user-friendly GUI for logging into your sessions:
(Alternative Method) Install XFCE Desktop Environment using apt
- If you prefer using the standard apt package management utility, then you can enter the command below to install the XFCE desktop environment:
sudo apt install task-xfce-desktop
- After successfully installing Xfce using apt, make some modifications using the following commands (the first command checks for your current default target; the second command sets your system to boot into the graphical interface by default):
sudo systemctl get-default sudo systemctl set-default graphical.target
With these steps, you have successfully installed Xfce. Continue reading to learn how to use the Xfce desktop environment.
Step 4: Select the XFCE Session
- After the installation process, you will need to restart your device using the below command for the changes to appear:
- When it boots back up, switch to “Xfce Session” from the available sessions at the login screen instead of the default “Default Xsession” as shown in the screenshot below. Choosing the “Xfce Session” prompts your system to start the Xfce desktop environment at login.
Note: Do not worry, as this selection isn’t permanent, and you can always switch between different desktop sessions from the login screen whenever you reboot your system.
Also Read: How to Install XFCE on Linux Mint
How to Remove Xfce from Debian 12
Removing the Xfce desktop environment is a straightforward process in case it fails to meet your expectations. All you need to do is enter the following command on the terminal to remove Xfce and all its associated packages from your system:
sudo apt autoremove '^xfce' task-xfce-desktop --purge
Troubleshooting Xfce Installation Issues on Debian 12 Bookworm
If you encounter issues while installing Xfce, try the following tips:
- Make sure that your system is fully updated by running the commands
sudo apt updateand
sudo apt upgradein the terminal.
- Next, check that your machine has a stable internet connection to fetch the necessary packages.
- Additionally, verify that you have the required user privileges for software installation. This will prevent any potential issues during the installation process.
- If you encounter problems with fetching or installing packages, attempt to resolve them by clearing your package cache with
sudo apt cleanbefore trying again.
By diligently following these steps, you can confidently proceed with your software installations on Debian.
In this tutorial, we have walked you through detailed steps, 1) updating and upgrading Debian packages, 2) installing Xfce via both Tasksel and the alternative apt method, 3) Setting Xfce as your default session, and offering guidance on its removal if it doesn’t suit your needs.