upgrade raspbian lite to desktop

Upgrade Raspberry Pi OS Lite to Desktop (PIXEL, KDE, …)

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.

Raspberry Pi OS Lite can be “upgraded” to Raspberry Pi OS with Desktop by installing the following GUI components:
– Xorg: the display server.
– LightDM: the display manager.
– Any desktop environment (PIXEL, KDE, MATE etc.).

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.

Get My Commands Cheat Sheet!
Grab your free PDF file with all the commands you need to know on Raspberry Pi!

PIXEL Desktop

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.

MATE

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.

KDE

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

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

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:

Get My Commands Cheat Sheet!
Grab your free PDF file with all the commands you need to know on Raspberry Pi!
  • sudo apt update
  • sudo apt upgrade
  • sudo apt dist-upgrade
  • sudo reboot

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. Install Xorg

Xorg is the display server on Linux systems.
That means that it’s the core component of any desktop environment.
So, whatever choice you have made, you need to install it first.

Xorg is available in the Raspberry Pi OS repository, you can install it with:
sudo apt install xserver-xorg

This will install about 75 new packages on your system, and after a few seconds, you are ready to move to the next step.

4. Install The Desktop Environment

Now you need to install the desktop environment you have chosen.
All of them are available in the Raspberry Pi OS default repository, so you can install them with apt.
Obviously, the command will be different depending on your choice.

  • To install the PIXEL Desktop, you can type:
    sudo apt install raspberrypi-ui-mods
    This will require over 560 packages with approximately 300 MB to download
  • If you prefer KDE, use this command:
    sudo apt install kde-plasma-desktop

    KDE will take more time to install, as you need to download over 750 packages for more than 650 MB to download. And the “kde-full” package is something like 1500M to download!
  • For LXDE the command is:
    sudo apt install lxde-core lxappearance
    This one is lighter, with 100M to download for about 300 new packages.
  • To install XFCE, enter the following command:
    sudo apt install xfce4 xfce4-terminal
    XFCE is the lightest environment in this list, with less than 250 packages (100M to download).
  • The MATE desktop installation can be done with:
    sudo apt install mate-desktop-environment-core
    For this one, it’s about 350 packages for 200M on a fresh new Raspberry Pi OS Lite.
  • Cinnamon is also available in the default repository, you can get it with:
    sudo apt install cinnamon-desktop-environment

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.
For some of them, you’ll need another package.

5. Install LightDM

As I told you in the introduction, LightDM is the display manager.
This 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, most of the previous commands installed LightDM automatically.
However, I noticed that at least MATE and KDE don’t install it by default.

To install it, just use the following command:
sudo apt install lightdm

If it does nothing, it’s because it’s already installed on your system.

Note: KDE, and maybe other environments in the future, use SDDM instead of LightDM. So, you shouldn’t need LightDM for KDE.

You can now restart your Raspberry Pi to enjoy your new environment:
sudo reboot

If the display interface doesn’t start automatically, you may need to change this:

  • Open raspi-config:
    sudo raspi-config
  • Got to System options > Boot / Auto login:
  • Choose “Desktop” or “Desktop Autologin” to make sure it starts the interface on boot.

And if you installed several desktop environments, you can switch from one to another with:
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:

    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
  • Chromium:

    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.

Video

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!

Get My Commands Cheat Sheet!
Grab your free PDF file with all the commands you need to know on Raspberry Pi!

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.

Conclusion

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:

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.

Get My Commands Cheat Sheet!
Grab your free PDF file with all the commands you need to know on Raspberry Pi!

Additional Resources

Not sure where to start?
Understand everything about the Raspberry Pi, stop searching for help all the time, and finally enjoy completing your projects.
Watch the Raspberry Pi Bootcamp course now.

Master your Raspberry Pi in 30 days
Don’t want the basic stuff only? 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.
Download the e-book.

VIP Community
If you just want to hang out with me and other Raspberry Pi fans, you can also join the community. I share exclusive tutorials and behind-the-scenes content there. Premium members can also visit the website without ads.
More details here.

Need help building something with Python?
Create, understand, and improve any Python script for your Raspberry Pi.
Learn the essentials step-by-step without losing time understanding useless concepts.
Get the e-book now.

You can also find all my recommendations for tools and hardware on this page.


This tutorial doesn't work anymore? Report the issue here, so that I can update it!

Similar Posts

17 Comments

  1. How to run plasma on rpi?
    I installed it using “sudo apt install kde-plasma-desktop”
    And lightdm is already installed
    But when I boot it up, it auto-loads the default pi desktop.
    Any help would be appreciated!

    1. Hello,

      I think you need to set plasma by default :

      sudo update-alternatives --config x-session-manager

  2. Hey I just installed MATE on the Raspbian Lite following your steps….after doing all installation I finally came to the desktop window where it shows the “log in” window. I tried username – pi and password – raspberry but it didn’t work….could you please help me solve this problem ?

    1. Hi,
      The username/password is the same as on Raspbian Lite
      So, if it was the default one on Raspbian Lite, there is no reason to be different in MATE :/

  3. this worked perferctly for my KDE desktop, unfortunaly I am not able to get the Wi-Fi to work with the KDE network manager.

  4. Yo Yo

    Good and clearly stuff for beginners.
    But.. I have problem in authorisation in KDE(full), MATE and LXDE,
    I changed password many times, maybe problem is in numbers of characters becouse in Raspdebian we can use one character but MATE in Linux MINT needs minimum few characters to pasword. I have acces to config but I can’t make changes to desktop
    And small sugestion to install full KDE, in the article everywhere is ‘sudo’ , in KDE-full command isn’t. The command dosent work without ‘sudo’
    ‘sudo kde-full’ works well,

    Anyway I like your stuff on web and yt, keep going!

    1. Hi,

      Ok, thanks for the information about the password length.
      I fixed the “kde-full” that was not intended to be displayed as a command to copy/paste, just the name of the meta package.

  5. Thank you to those involved in creating this page! Two old farts trying to learn Linux on a Raspberry Pi 4B 8GB just got to the desktop, after 4 previous attempts that broke the kernel partition. Now, to learn some things (:>)

  6. same as ubuntu’s script for kde desktop its
    sudo apt install kde-plasma-desktop

  7. I installed XFCE but the desktop didn’t appear on the reboot. I then looked through the comments and tried what Daniel suggested: ” sudo dpkg-reconfigure lightdm”. Rebooted and got a desktop – Yay!
    Thanks Daniel.

  8. If you follow this very fine tutorial but boot to the command line, just run sudo raspi-config and select the option to boot to desktop and you’ll be good to go.

Comments are closed.