In this article you’ll learn how to install the XFCE desktop on your Raspberry PI. We’ll take a minimal install of the Raspberry PI operating system as a starting point. The XFCE installation on your Raspberry PI includes setting up all necessary building blocks, such as: display server, display manager, session manager, window manager and desktop environment.
Background
When you install the default Raspberry PI operating system, it presents you with the PIXEL desktop. The Raspberry PI foundation developed and maintains the PIXEL desktop. It offers a user-friendly desktop, with all basic features and applications included. For example: an application menu, a file manager, a text editor, etc. PIXEL is lightweight, meaning that it doesn’t consume a lot of RAM and CPU resources. This makes it run smoothly, even on a Raspberry PI Zero with only 512 MB of RAM.
So why would you want to switch to another desktop, such as XFCE? I can think of a few reasons:
- As a Linux desktop user, you probably did your fair share of desktop environment hopping. You might have settled on the XFCE desktop. Consequently, you prefer to run the XFCE desktop also on your Raspberry PI.
- Your Raspberry PI serves as a Linux learning platform. You would like to find out what it takes to install a desktop environment from scratch.
The new Raspberry PI 400
Over the years the Raspberry PI has gotten ever more powerful. It’s no longer just an embedded Linux board. Especially the Raspberry PI 4 packs enough CPU power and RAM for usage as you daily desktop computer. The Raspberry PI foundation thinks so too. Just look at the Raspberry PI 400 model they recently released. They market it as a “complete personal computer, built into a compact keyboard”:

You no longer need to restrict yourself to the PIXEL desktop. The Raspberry PI 4 comes a quad-core 64-bit CPU and 2, 4 or 8 GB RAM. More than sufficient to run a ‘real’ Linux desktop such as XFCE, KDE or Gnome.
Why the XFCE desktop
So why did I select the XFCE desktop for this article? In my opinion the XFCE desktop sits nicely between the PIXEL desktop and the more resource intensive desktops such as Gnome and KDE. It offers a full desktop experience, while still being lightweight and with snappy responsiveness. The XFCE desktop is stable, well maintained and available in all major Linux distributions. It’s the desktop environment I personally select, when installing a Linux desktop on older hardware or in a virtual machine.
What do you need
To complete the steps in this article and install the XFCE desktop on your Raspberry PI, you need the following:
- Any Raspberry PI 4 board, including the new Raspberry PI 400.
- A power supply for the Raspberry PI board.
- A micro-SD card of 8 GB or more in size.
- A USB mouse
- A USB keyboard (not needed for the Raspberry PI 400).
- A computer monitor or TV.
- A cable for connecting the HDMI output to your monitor or TV.
Throughout this article, I assume you already installed the Raspberry PI operating system. I recommend the Lite edition. The Lite edition of the Raspberry PI operating system does not include a graphical desktop environment. That way you start with a clean slate.
I’ll be using my Raspberry PI 4 with 4 GB RAM to install the XFCE desktop. I already installed the Lite edition of the Raspberry PI operating system on it. Furthermore, I added a new user account for user pragmalin
and removed the default pi
user account, for security purposes. Although not necessary, I recommend that you start with the same foundation. Refer to the previously published tutorial on how to perform a minimal install on your Raspberry PI for step-by-step instructions.
Graphical desktop components
Before diving right into the installation of XFCE on your Raspberry PI, I would like to present a brief overview of all the components that go into a Linux graphical desktop. This theoretical background information is optional. Feel free to skip to the next section to continue with the hands-on XFCE installation part on your Raspberry PI.
Refer to the following illustration for an overview of all components:

Note the added text after the arrow in the illustration. These are the specific components we’ll install for our XFCE desktop. For a Linux graphical desktop, the specific components can differ. For example, a Gnome desktop environment typically uses the gdm display manager instead of lightdm.
Display server
In order to do anything graphically, as opposed to just the basic command line, you need a display server. It provides the foundation needed by all the other components. It handles outputting pixels on the display and detecting input events from the mouse and keyboard.
Display manager
Think of the display manager as the login screen. It is the first thing that gets started if the operating system supports a graphical desktop. On this screen you enter your username and password to login. Furthermore, it offers you a choice of the desktop session to start.
Session manager
After logging in, the display manager hands control over to the session manager. Simply put, the session manager manages the state of the desktop of the logged in user(s). So which applications are running and what their window state and position is. Furthermore, the session manager makes it possible to save your desktop when you logout. Upon the next login it can automatically restore your desktop for you.
Window manager
The window manager controls the placement, movement and look of all windows and their controls (button, check box, etc). Its the one that draws the border around each window and adds the title bar. Additionally, the window manager enables you to tile, stack and move windows around.
Desktop environment
To have a fully functional graphical desktop you still need a bit more. For example an application menu, a task-bar panel showing running applications and notification icons. And then your basic suite of applications such as a file manager, terminal program, text editor, etc. The desktop environment combines all these parts. Its goal is to provide you with a cohesive and productive graphical user experience.
Install the XFCE desktop components
At this point you have a good understanding of what components you need, to install the XFCE desktop on your Raspberry PI. Time to get our hands dirty. We’ll install all the XFCE desktop components in one go on your Raspberry PI. This includes:
- Xorg display server
- lightdm display manager
- xfce4-session session manager
- xfwm4 window manager
- xfce4 desktop environment
Power up your Raspberry PI and login with your username and password at the console. Next, run the following command to install the XFCE desktop components on your Raspberry PI:
sudo apt install -y xserver-xorg xfce4 xfce4-goodies

As you can see in the last line of the screenshot, all XFCE desktop components consume about 1 GB of disk space. With all the XFCE desktop components installed on your Raspberry PI, we continue with setting them up.
Setup the XFCE desktop components
In the previous section, we installed all XFCE desktop components on your Raspberry PI. As a next step we make sure the right desktop components are selected. If you started with a minimal install of the Raspberry PI operating system, this will most likely be the case already. However, if you previously installed a different desktop environment, we need to double-check this selection, to make sure it works for an XFCE desktop.
Select the display server
You probably only have one display server installed (Xorg), so you do not have to explicitly select one. However, it could be that you didn’t have a display sever installed before. In this case we need to verify that the display server gets started during boot.
Systemd should handle this for us. Without the presence of a display server, Systemd’s default boot target is the multi user shell. Also called multi-user.target
. When installing a display server, Systemd’s default boot target should change to a graphical multi user shell. This one is called graphical.target
.
To determine Systemd’s default boot target, run this command:
sudo systemctl get-default

It should output graphical.target
. If it doesn’t, then you can set it manually by running the command:
sudo systemctl set-default graphical.target
.
Select the display manager
The following component to select is the display manager. We want to select lightdm as the display manager. Easily achieved by running the following command:
sudo dpkg-reconfigure lightdm

Select the session manager
Next we’ll go ahead and select the session manager. Type this command in the terminal:
sudo update-alternatives --config x-session-manager

On this screen we need to make sure startxfce4 is selected as the session manager. Press Enter if startxfce4 is already selected, otherwise enter the number of the startxfce4 session.
A bit odd, right? In an earlier section I mentioned that we want the xfce4-session session manager. The selection menu lists xfce4-session, so why not pick it? The startxfce4 file consists of a script that initializes the XFCE session and under the hood calls the xfce4-session executable for us. This makes startxfce4 the better option here.
Select the window manager
Continue with the selection of the window manager. Run the following command:
sudo update-alternatives --config x-window-manager

On my Raspberry PI, xfwm4 is the only available window manager. Therefore no additional configuration is needed.
Select the desktop environment
You select the desktop environment on the login screen. So now would be the right time to reboot our Raspberry PI and wait for the login screen to show up. On the top right corner of the screen, there is a little icon you can click. Select Xfce Session from the drop-down menu:

Configure the XFCE desktop
At this point we completed installing and selecting the right components for the XFCE desktop on our Raspberry PI. In this section we’ll make some final configurations for our XFCE desktop. If you followed along step-by-step, you are now staring at the login screen. Go ahead and enter your username and password to login.
Panel layout
After logging in to your XFCE desktop for the first time, it presents you with a dialog. The dialog allows you to select a default panel layout for your desktop. Select Use default config here. This creates a traditional desktop layout with application menu with task bar that includes a notification area. It serves as a good starting point.

Remember username when logging in
Personally, I find it a bit cumbersome to enter my full username on the login screen every time. I would prefer it, if the lightdm display manager remembers the last logged in username. Ideally it would present me with a drop-down box to select my username, instead of me typing my username. Luckily, this is possible. We just need to change one setting in the lightdm configuration file.
Go ahead and edit the lightdm configuration file from the terminal with Nano. Refer to this article for a quick refresher on editing files with the Nano terminal text editor. Run the following command from the terminal:
sudo nano /usr/share/lightdm/lightdm.conf.d/01_debian.conf
Next change the value of greeter-hide-users to false
:

Remove the black border around your screen
Depending on your monitor, you graphical desktop might not fill the entire screen. Just like in my case, you could see a black border around the screen. If your display does not present you with this problem, you can skip this section. Otherwise, follow along and we’ll fix it.
An incorrect setting for Underscan/overscan causes this problem. The good news is that we can easily change this setting with the raspi-config tool. Open up your terminal program and start the raspi-config tool:
sudo raspi-config
From the main menu, select Display Options:

On the next screen, select menu item Underscan from the menu:

A dialog appears, allowing you to enable or disable compensation for displays with overscan. In my case, I had to select No here. I’m guessing the same is true for you. If it didn’t fix the problem, you can always go back into raspi-config
and select Yes instead.

With the Underscan/overscan setting changed, reboot your Raspberry PI to verify that this configuration change fixed the problem.
Install additional desktop applications
Congratulations! You successfully completed the install of the XFCE desktop on your Raspberry PI. The XFCE desktop you installed, comes bundled with several applications. For example:
- Thunar file manager
- Mousepad text editor
- Terminal emulator
The XFCE desktop project offers several more applications for you to install. You can find an overview here: https://docs.xfce.org/apps/start. You can of course install other non XFCE specific applications as well. Which additional desktop application to install depends on your preference.
Personally, I prefer to have at least the following desktop applications:
- FireFox web browser
- Thunderbird e-mail client
- LibreOffice office suite
- GIMP and Inkscape for image editing
Here’s how I installed the above mentioned desktop applications:
sudo apt install -y firefox-esr thunderbird gimp inkscape libreoffice libreoffice-gtk3 libreoffice-gnome default-jdk
And to complete this section, here is a screenshot of my XFCE desktop in action on the Raspberry PI:

Wrap up
After going through this article, you now have the XFCE desktop installed and happily running on your Raspberry PI. This included the installation and configuration of all necessary building blocks:
- Xorg display server
- lightdm display manager
- xfce4-session session manager
- xfwm4 window manager
- xfce4 desktop environment
Where to go from here? Well, XFCE is highly configurable. The default layout looks a bit dated, but do not be fooled by this. With a bit of tweaking, you can make it look very modern and appealing. Start by changing your desktop background and installing a different theme, for example arc-theme. Next, install a different icon theme. The moka-icon-theme looks pretty good to me. The default application menu looks a bit simplistic and misses a search feature. Try replacing it with the whisker menu. Details on this can be found in the tutorial about how to install and configure the XFCE whisker menu.
Before installing new software on your Raspberry PI, consider making a snapshot of your current Raspberry PI operating system. The snapshot enables you to quickly switch between projects or restore your Raspberry PI operating system, in case something went wrong.
FAQs
How do I run XFCE on desktop? ›
Xfce can be started from the console simply by running the startxfce4 command. startxfce4 is a script that sets the required environment variables and calls Xinit to start the X server with the Xfce session.
How do I install Xfce GUI? ›Install XFCE on Ubuntu
Install a tool for initialization of a graphical system (it will launch the XFCE environment). In some versions of the OS, the system will offer a choice of "gdm3" and "lightdm" tools. Select "lightdm" and press Enter. The system will install it.
Xfce Has Low System Requirements
Many Linux distributions choose Xfce for the simple reason that it can run easily on a wide range of hardware. But not only can Xfce function on an underpowered machine, but it also doesn't look like it's chugging along while doing so.
KDE and Xfce run on few system resources, but Xfce is definitely faster and more lightweight.
Is Xfce better than Gnome? ›GNOME shows 6.7% of CPU used by the user, 2.5 by the system and 799 MB ram while below Xfce shows 5.2% for CPU by the user, 1.4 by the system and 576 MB ram. The difference is smaller than in the previous example but Xfce retains performance superiority.
Is Xfce fast? ›Xfce or XFCE (pronounced as four individual letters) is a free and open-source desktop environment for Linux and other Unix-like operating systems. Xfce aims to be fast and lightweight while still being visually appealing and easy to use. Xfce embodies the traditional Unix philosophy of modularity and re-usability.
What is task Xfce desktop? ›This task package is used to install the Debian desktop, featuring the Xfce desktop environment, and with other packages that Debian users expect to have available on the desktop.
What is Xfce desktop environment? ›XFCE is defined as an open-source environment for desktops or PCs specifically aimed at Linux and BSD operating systems. With the native intent, while developing the open-source environment of keeping it lightweight and fast, XFCE personifies the art of modularity and, hence promoting re-usability.
Is XFCE faster than Cinnamon? ›...
Cinnamon, MATE or Xfce?
Cinnamon | The most modern, innovative and full-featured desktop |
---|---|
Xfce | The most lightweight desktop |
LXQt and LXDE are lighter than Xfce, but that's only one part of the story. LXDE looks more basic compared to Xfce. With enough effort, Xfce can feel like a more modern desktop environment. The primary difference between LXQt and Xfce is that LXQt uses Qt rather than GTK+.
How to install XFCE without applications? ›
You can run this command to install xfce4 without the extra applications -- sudo apt-get install xfce . This was also asked in another post that I found: How to install Xfce desktop environment? Save this answer. sudo apt-get install xfce worked.
Which Linux desktop is fastest? ›- Budgie is a GNOME-based Linux desktop. It's developed and used by Solus Linux distribution. ...
- GNOME is a very popular Linux desktop environment. Many Linux distros use GNOME. ...
- KDE is also popular as the Plasma desktop.
If agile performance is what you are after, you might be biased about XFCE. Having said this, it has veritably less RAM usage than KDE plasma, using only 531MB idly, regardless of VM execution or native installation.
Does Linux makes PC faster? ›There are many reasons for Linux being generally faster than windows. Firstly, Linux is very lightweight while Windows is fatty. In windows, a lot of programs run in the background and they eat up the RAM. Secondly, in Linux, the file system is very much organized.
Which is lighter XFCE or plasma? ›KDE Plasma and Xfce are two popular desktop environment options for lightweight Linux distributions. While Xfce is still favored more for some of the best lightweight Linux distributions, KDE Plasma is not a resource-heavy desktop either.
How much RAM does KDE use? ›5 and KDE-Framework 5.87. KDE occupies 6 GiB of RAM in idle, so if I dont use any program.
What is the most performant Linux distro? ›Ubuntu - Best overall Linux distro for laptops
Ubuntu by default uses Unity as its desktop environment but is also available in different flavors like Lubuntu (which is based on LXDE/LXQT), Xubuntu(which uses the XFCE desktop environment), and Kubuntu(which features KDE Plasma).
Xfce is a lightweight desktop environment for UNIX-like operating systems.
Which XFCE distro is best? ›Manjaro XFCE - Best lightweight Arch-based Linux distro
Manjaro offers cutting-edge software packages based on the Arch User Repository (AUR). Apart from using the Arch repositories, the Manjaro community also maintains its own repository for the latest software packages.
Yes, XFCE is one of the lightest desktop environments out there. Definitely a great choice for old or low spec hardware. What do people use their Linux desktop PCs for? Graphical User Interfaces (GUI): What is the difference between "Gnome" and "KDE"?
Is Xfce more lightweight than GNOME? ›
Gnome uses around 800 MB of RAM. It uses lower memory space, unlike the other desktop software. The memory footprint of Xfce is around 500MB of RAM. Lower consumption of CPU and memory reflects in the overall performance.
How big is Xfce? ›Task | Installed size (MB) | Download size (MB) |
---|---|---|
• Xfce | 2122 | 593 |
• LXDE | 2133 | 602 |
• MATE | 2288 | 644 |
• Cinnamon | 2878 | 843 |
The installation will take a few minutes depending upon the internet speed ; moreover, during installation a prompt window will be displayed that contains two famous display managers “GNOME display manager (gdm)” and “Light Display Manager (LightDM)”.
Is Xfce the same as Ubuntu? ›Xubuntu is a desktop environment that stands for XFCE which is defined as the easy-to-use operating system, which is a community-maintained derivative of the Ubuntu operating system. In general, Xubuntu is defined as Ubuntu which is better used for older machines with less memory and less-capable hardware.
Is Xfce more stable? ›The main benefit of Xfce is that it is extremely stable and lightweight. Yes, even more so than MATE! In a neutral state, it uses around 516G in memory and stays very stable with its CPU usage.
Is Xfce the same as GNOME? ›XFCE is much more lightweight and flexible. You can tweak a lot out of XFCE. Gnome in comparison is much heavier and less flexible.
Is Mint or Ubuntu faster? ›The Mint Software Manager is faster than Ubuntu's. Mint is also straightforward and provides more usability options, which allows a user to find things quickly.
Is Linux Mint fast? ›It appears to show that Linux Mint is a fraction faster than Windows 10 when run on the same low-end machine, launching (mostly) the same apps.
Is 4GB RAM enough for Linux Mint Cinnamon? ›The absolute minimum amount of hard drive space for Mint is 9GB. However, it's recommended to go around 20GB. Compare this to Windows' OS files alone being around 30GB. And if you have decent swapper space, you can run very efficiently on 4GB of RAM.
How much RAM does LXDE use? ›System Requirements
After X11 and LXDE are started, the total memory usage is about 45 MB on i386 machines. (This value may be higher or lower according to different system configurations.)
Is LXDE abandoned? ›
LXDE looks like [it has been] abandoned and it is a good thing to move away [from it] to an active project.
Is LXDE faster than XFCE? ›If you are talking about speed and being lightweight, then you should choose LXDE! If you are talking about being beautiful and elegant but still a little bit fast and not resource-intensive, then choose XFCE!
Can Xubuntu run on 1GB RAM? ›While Xubuntu can run on 1GB of memory, for the best experience you will need 2GB. A 1.5Ghz dual-core processor is also recommended, along with 20GB HDD space.
How to run Xfce from terminal? ›You can also start xfce4-terminal from a command line or from the Application launcher. Just hit Alt-F2, type Xfce Terminal and click the button Execute.
What is the latest Xfce version? ›Xfce 4.16 is the most recent version of the Xfce desktop environment. You can find the changes in this release here.
Which Linux is best for 4gb RAM? ›Some distros like fedora or ubuntu come with different versions (or spins) which install different windows managers as default. For your system I would suggest using something like the Xubuntu spin which uses XFCE as it's windows manager. Fedora has a XFCE desktop spin as well.
Which Linux is best for daily use? ›- Linux Mint. Linux Mint is a popular distribution of Linux based on Ubuntu and Debian. ...
- Ubuntu. This is one of the most common Linux distributions used by people. ...
- Pop_OS! from System76. ...
- MX Linux. ...
- Elementary OS. ...
- Fedora. ...
- Zorin. ...
- Deepin.
KDE is CPU/GFX heavy.
Is KDE faster or GNOME? ›GNOME is generally regarded as streamlined and less resource-intensive than KDE. Interestingly, while GNOME's minimum system requirements are less demanding as far as CPU speed is concerned (700 Mhz, vs KDE's 1 Ghz requirement), KDE actually requires less minimum RAM (615 MB vs GNOME's 768 MB).
Why is KDE Plasma so good? ›It's good for new-to-Linux users as well as those who've been around the Linux block a few times. I'd go so far to say this is the best release of KDE Plasma I've ever experienced. It's clean, performs as well as any other environment, and is as elegant a desktop as you'll find.
How much RAM is good for Linux? ›
Linux requires very little memory to run compared to other advanced operating systems. You should have at the very least 8 MB of RAM; however, it's strongly suggested that you have at least 16 MB. The more memory you have, the faster the system will run.
Does Linux consume less RAM? ›Linux's strength comes not from a magical ability to make your computer run the same apps using less memory. A web browser on Linux will guzzle GBs of RAM, just as it does on Windows.
Who own Linux? ›Who “owns” Linux? By virtue of its open source licensing, Linux is freely available to anyone. However, the trademark on the name “Linux” rests with its creator, Linus Torvalds. The source code for Linux is under copyright by its many individual authors, and licensed under the GPLv2 license.
Is Cinnamon faster than XFCE? ›...
Cinnamon, MATE or Xfce?
Cinnamon | The most modern, innovative and full-featured desktop |
---|---|
Xfce | The most lightweight desktop |
LXQt and LXDE are lighter than Xfce, but that's only one part of the story. LXDE looks more basic compared to Xfce. With enough effort, Xfce can feel like a more modern desktop environment. The primary difference between LXQt and Xfce is that LXQt uses Qt rather than GTK+.
Is XFCE faster than LXDE? ›If you are talking about speed and being lightweight, then you should choose LXDE! If you are talking about being beautiful and elegant but still a little bit fast and not resource-intensive, then choose XFCE!
Is MATE or XFCE better? ›The main differences between Xfce and MATE are in customization, leanness, and upgrade frequency. Xfce has better customization options and is slightly more lightweight compared to MATE. On the flip side, it only receives updates once every 1 to 4 years.
How much RAM does XFCE use? ›If agile performance is what you are after, you might be biased about XFCE. Having said this, it has veritably less RAM usage than KDE plasma, using only 531MB idly, regardless of VM execution or native installation.
Which Linux distro runs fastest? ›- 1 GHz processor.
- 512 MB of system memory (RAM)
- 8 GB of free disk space.
Xfce or XFCE (pronounced as four individual letters) is a free and open-source desktop environment for Linux and other Unix-like operating systems. Xfce aims to be fast and lightweight while still being visually appealing and easy to use. Xfce embodies the traditional Unix philosophy of modularity and re-usability.
Which Linux GUI is the lightest? ›
Unlike many other Linux distributions, Zorin isn't built for servers. Instead, it is built with the desktop users in mind every aspect of its user interface reflects the same. Zorin OS Lite is the best lightweight Linux distribution if you want a fast and stable system without compromising on the looks.
Which is lighter XFCE or GNOME? ›Gnome uses around 800 MB of RAM. It uses lower memory space, unlike the other desktop software. The memory footprint of Xfce is around 500MB of RAM. Lower consumption of CPU and memory reflects in the overall performance.
Which is lighter XFCE or KDE? ›KDE Plasma and Xfce are two popular desktop environment options for lightweight Linux distributions. While Xfce is still favored more for some of the best lightweight Linux distributions, KDE Plasma is not a resource-heavy desktop either.
Is i3 faster than XFCE? ›It can do everything that regular wm can and much more. It is much faster than XFCE, especially on older hardware.
Which Linux is faster than Ubuntu? ›The Mint Software Manager is faster than Ubuntu's. Mint is also straightforward and provides more usability options, which allows a user to find things quickly. For example, a common mistake for beginners is to mess with the PPA repository while installing third-party software.
Is Xubuntu faster than Ubuntu? ›Many different companies today use Ubuntu desktop as it is still popular but is not that fast as Xubuntu as this has unity desktop and some companies are Reddit, Snapchat, Tokopedia, Robinhood, Instacart, etc. Xubuntu uses XFCE tools which are also powerful for working with Xubuntu.
Is Gnome heavier than Xfce? ›Gnome 3 is a more "modern"/unconventional DE. It looks great, but is a little heavier on resources than Xfce (not as much as you might imagine). Gnome 3 is more Beginner-friendly, because everything is organized into one big app-menu box thing.