Raspberry Pi OS (formerly Raspbian) is available in two main versions: Raspberry Pi OS Lite and Desktop. Raspberry Pi OS Lite is a minimal Linux version with only a terminal. Desktop includes the PIXEL Desktop environment. For many reasons, you may need to upgrade the Lite version and add a desktop environment (PIXEL or any other one). This guide will show you how.
The easiest way to upgrade Raspberry Pi OS with a desktop environment is to use the “tasksel” command and select one listed in this tool. It will automatically install all the requirements: the display server, the login manager and of course the desktop environment itself.
In this post, I will start by explaining why you may want to upgrade from Raspberry Pi OS Lite to Desktop, and how to do the upgrade with each of the main desktop environments available.
If you’re looking to quickly progress on Raspberry Pi, you can check out my e-book here. It’s a 30-day challenge where you learn one new thing every day until you become a Raspberry Pi expert. The first third of the book teaches you the basics, but the following chapters include projects you can try on your own.
Why upgrade Raspberry Pi OS Lite to Desktop?
Most of you already know why you are here.
But for those who are curious, I will start with a short introduction about why you would need to upgrade your Raspberry Pi OS Lite SD card to a Desktop environment.
The first reason can simply be that you have changed your mind.
Sometimes, we start an installation for a basic project (a web server for example), then we add other services and configurations.
You might need a desktop environment and don’t want to lose everything running in the background. In this case, an upgrade is a good choice, as you can upgrade to a desktop while keeping the background installation
The second reason might be to choose your desktop environment.
When you install Raspberry Pi OS with Desktop, you get the PIXEL Desktop environment.
If you want another one, you’ll need to install it manually (tutorial here), and most of the PIXEL packages will stay installed on your Raspberry Pi taking up disk space for nothing.
And finally, the smartest reason might be for performance.
Even if you want to use PIXEL, you may not want to use all the default apps that it comes with.
By installing a desktop environment above Raspberry Pi OS Lite, you install only the necessary packages and can choose which applications you want to install later.
If you are a bit lost with all the Raspberry Pi OS versions, you should probably read this article first: Raspberry Pi OS Versions: All Your Questions Answered.
Choose your Desktop Environment
Now that you have decided to upgrade your Raspberry Pi OS Lite, you first have to choose which desktop environment you want.
Here is a quick introduction to the desktop environments available on Raspberry Pi OS.
I took screenshots after upgrading from Raspberry Pi OS Lite to these desktop environments, so the main menu is pretty empty.
PIXEL is the default desktop environment on Raspberry Pi OS with Desktop.
You probably already know PIXEL well.
PIXEL stands for “Pi Improved Xwindow Environment Lightweight”.
As PIXEL is developed directly by the Raspberry Pi Foundation, it’s probably the most stable and optimized desktop environment that you can choose for your Raspberry Pi.
But there are many other possible choices that we’ll examine now.
Note: With the update to Bookworm, and the switch to Wayland instead of X11, your best option to get PiXeL on your Raspberry Pi now is to install it from scratch, by following this tutorial instead.
The MATE Desktop has existed since 2011 and is increasingly chosen for Desktop PC.
MATE is a fork of GNOME 2 that was created following the bad reviews of GNOME 3.
I really like this desktop environment, as it has a modern look after installation.
On Raspberry Pi 4 it’s perfect (check the current price on Amazon), but on older Raspberry Pi devices, memory usage may be an issue.
Even if it’s probably the heaviest desktop environment available for Raspberry Pi OS, KDE works pretty well on the latest Raspberry Pi 4 (especially if you have 8 GB of RAM).
If you want a modern interface or are a fan of KDE on a Desktop PC, this can be a good choice.
Here is an article where I explain the real differences between the 4 GB and 8 GB versions of the Raspberry Pi 4, and when it makes sense to use each of them.
XFCE is one of the lightweight desktop environments that you can choose if you are looking for performance.
Its main goal is to be fast and low on system resources, so it’s perfect for any Raspberry Pi model.
The default look seems dated, but you can easily improve it if performances are not your main concern.
LXDE stands for “Lightweight X11 Desktop Environment”, and as the name suggests, it’s one of the lightest desktop environments available on Raspberry Pi OS.
Thanks to its strengths, LXDE was the former official operating system on Raspberry Pi.
It’s close to XFCE (probably with fewer features), so you might have to try both to make your choice!
If you want more details about each choice, you can read my article about the top desktop environments available on Raspberry Pi. It will show you each desktop environment and give you the pros & cons of each solution.
Upgrade Raspberry Pi OS Lite with a Desktop Environment
Now that you’ve made your choice, we can get to installation.
The beginning is the same for any desktop environment.
1. Install Raspberry Pi OS Lite
If you are reading this, you probably already have Raspberry Pi OS Lite installed.
But if you are just curious, you need to start by installing it.
If you need some help doing this, you can read my Raspberry Pi OS installation guide by clicking on the link.
2. Update the system
Before going further, I recommend updating your system to avoid any issues later on.
Type the following command on your Raspberry Pi:
sudo apt update
sudo apt upgrade
sudo apt dist-upgrade
Once your system is up-to-date, you can start the installation.
Are you a bit lost in the Linux command line? Check this article first for the most important commands to remember and a free downloadable cheat sheet so you can have the commands at your fingertips.
3. Use Tasksel
While it’s possible to install the packages required by your desktop environment of choice manually, the easiest option it to use tasksel instead.
Tasksel is a tool, helping you to add new features to an existing Linux system. You may have already seen its interface during a traditional Linux installation (on a standard computer or server).
Anyway, the command to use it is quite straightforward:
You’ll get a wizard looking like that:
Use the arrows on your keyboard to move the cursor, and the space key to select / unselect an option. You can see the list of desktop environments, make sure to select the one you want to install.
In my screenshot, I have selected LXDE. You can see that as there is a star next to it (the line is checked).
Once done, press TAB to switch to the OK/Cancel buttons at the bottom of the script, select “OK” and press Enter to start the installation. The system will install all the required packages automatically:
Whatever your choice, this will take some time, as you need to download a few hundred MB of packages and install them on the Raspberry Pi, which is not the fastest computer in the world.
So, be patient, and wait a few minutes.
Once done, you’re almost ready. Please don’t reboot the Raspberry Pi yet.
4. Automatically start the desktop environment
By default, Raspberry Pi OS Lite starts on the terminal prompt, with the autologin disabled (so you have to type your username and password before doing anything).
It’s possible to change this default behavior, to start the desktop environment automatically. Here is how to do it:
- Open the Raspberry Pi configuration with:
- Press Enter to access the system options.
- Use the arrows to select “Boot / Auto login”:
Press “Enter” again to access it.
- You’ll then have four options, on how you want to start your system:
I guess you’ll have to change for “Desktop” or “Desktop Autologin” to start the desktop environment automatically on the next boot.
Autologin will start the session automatically, which is not ideal in terms of security (more about that here), but it’s fine for a test machine on a home network.
After changing this option, raspi-config will ask you to reboot the Raspberry Pi, which is also necessary to start the desktop environment, so accept the prompt and wait a few minutes for the system to restart.
If needed, you can reboot it manually with:
5. (Optional) Install LightDM
As I told you in the introduction, LightDM is the display manager.
This type of package is mandatory to automatically start the desktop environment on boot and to manage the login. It’s the link between everything if you want (Raspberry Pi OS, Xorg and your desktop environment).
When I tested everything, tasksel installed LightDM (or an alternative) automatically most of the time. But for some desktop environments (like GNOME), it must be installed manually. You might get this message after changing the boot options in raspi-config:
To install it, just use the following command:
sudo apt install lightdm
Once installed, get back to the previous step (select Desktop in Boot options and reboot the Raspberry Pi).
Note: KDE, and maybe other environments in the future, use SDDM instead of LightDM. So, you shouldn’t need LightDM for KDE, it’s normal if you don’t have it.
If everything works as expected, you should get the graphical interface started automatically on the next boot, with the login screen (if enabled) and then full access to the desktop interface:
The look will be different depending on the desktop environment you installed, but it shouldn’t be the usual black screen anymore :-).
If you installed several desktop environments, you can switch from one to another with by using the gear icon in a corner of the login screen (can be slightly different depending on your environment, but there should be an option).
Or use this command if autologin is enabled:
sudo update-alternatives --config x-session-manager
Type the number corresponding to the one you want to use, and it will start this one on the next restart.
Install more applications
As you’ll quickly notice, whatever desktop environment you choose, the apps available are very limited.
For most, you only get a terminal and the system settings, which isn’t enough to use it as a desktop PC.
Here are a few apps I recommend installing before going further:
Synaptic is a package manager. Even if you are coming from Raspberry Pi OS Lite (and probably know how to use apt in a terminal), it can be useful to have a graphic interface to manage packages
You can install it with:
sudo apt install synaptic
How can you check RaspberryTips.com with a web browser? 🙂
Seriously, a web browser is mandatory, and you can install Chromium with this command:
sudo apt install chromium-browser
- Install a new theme:
For most desktop environments, the default appearance is not optimal and you get a light system with an ugly style.
If you are not looking for only performance, you can try to install a theme.
The installation depends on the environment you have, but you can find some information in this post.
That’s it for the basics.
If you are looking for new apps to try, you can also check my 17 recommend apps for Raspberry Pi OS here.
And I also have a complete tutorial on how to install new apps on Raspberry Pi that you can check if needed.
Here is the video that shows you the complete tutorial step-by-step if you want to follow along while doing it on your side:
If you want to see more of this, please subscribe to the YouTube channel by clicking here. I’m adding a new video every week!
Reminder: Remember that all the members of my community get access to this website without ads, exclusive courses and much more. You can become part of this community for as little as $5 per month & get all the benefits immediately.
Congrats! You now know how to install any desktop environment on Raspberry Pi OS Lite.
Even if it’s not as practical as downloading the Raspberry Pi OS Desktop image, it’s a good choice if you want to try other environments or improve your Raspberry Pi performance.
And now that you have a desktop environment, you are ready to check my other tutorials where a desktop environment is required :-). Here are a few suggestions:
- How to Easily Create Desktop Shortcuts on Raspberry Pi OS?
- Can a Raspberry Pi 4 really Replace your Desktop PC? (I Tried)
- The 7 Best Text Editors for Programming on Raspberry Pi
If you have any thoughts about this, feel free to leave a comment in the community.
And as usual, if you like this post, thanks to share it on your favorite social network, it helps me a lot.
Whenever you’re ready, here are other ways I can help you:
The RaspberryTips Community: If you want to hang out with me and other Raspberry Pi fans, you can join the community. I share exclusive tutorials and behind-the-scenes content there. Premium members can also visit the website without ads.
Master your Raspberry Pi in 30 days: If you are looking for the best tips to become an expert on Raspberry Pi, this book is for you. Learn useful Linux skills and practice multiple projects with step-by-step guides.
The Raspberry Pi Bootcamp: Understand everything about the Raspberry Pi, stop searching for help all the time, and finally enjoy completing your projects.
Master Python on Raspberry Pi: Create, understand, and improve any Python script for your Raspberry Pi. Learn the essentials step-by-step without losing time understanding useless concepts.
You can also find all my recommendations for tools and hardware on this page.