Installing Raspberry Pi OS Lite is a great way to get the most out of any Raspberry Pi computer. It’s particularly useful on older models and the Pi Zero series.

But what if you suddenly need to use a desktop? Raspberry Pi OS Lite doesn’t ship with a desktop environment, so what should you do?

Well, you don’t need to switch to the standard Raspberry Pi OS. Instead, you can simply install the Raspberry Pi’s own desktop environment, PIXEL.

What Is Raspberry Pi OS Lite?

Many operating systems are available for the Raspberry Pi these days, but the recommended option is Raspberry Pi OS. This comes in three flavors:

  • Raspberry Pi OS Lite
  • Raspberry Pi OS Full
  • Raspberry Pi OS Extended

In most cases, when installing a Raspberry Pi OS, you probably rely on the Full or Extended versions, which ship complete with a desktop environment and various apps. (The Extended version has more apps than Full).

But for scenarios where no desktop environment is required -- such as running a server, or controlling a robot -- Raspberry Pi OS Lite is the best option.

Based on Debian 11 (at the time of writing) and just 338MB in size (pre-installation), Raspberry Pi OS Lite isn’t the most lightweight option for the Raspberry Pi, but it is the official lightweight OS.

Note that there are 32-bit and 64-bit versions of Raspberry Pi OS Lite.

Why You Might Switch From Lite to Desktop

As you might have guessed, Raspberry Pi OS Lite is so slimline because it has no desktop environment. But you might need that to change. There might be an app that you need to run, or a service that is easier to manage using a mouse than a keyboard.

You might simply need to access the internet and prefer a desktop web browser to the Lynx text-based browser (or the other slower methods of accessing the web without a browser). There are many reasons for installing a desktop environment on Raspberry Pi OS Lite.

For example, I was using Raspberry Pi OS Lite for a barebones project recently. After getting into some difficulty and realizing I needed additional desktop-only software, installing a desktop environment became necessary.

While sticking to the Pi’s command line interface is preferable in many cases, sometimes you just need a desktop.

What Is the Raspberry Pi OS Desktop Environment?

If you’re thinking of the Raspberry Pi OS, you’re probably picturing PIXEL.

Using a modified version of LXDE with the Openbox stacking window manager, PIXEL features a unique theme that gives it that Raspberry Pi feel. Introduced in 2017, it’s certainly an improvement on the basic desktop included with the original Raspbian operating system.

As you know, the Raspberry Pi OS Full and Extended versions feature the PIXEL desktop. As Raspberry Pi OS Lite does not, if you need to use the desktop environment, you’ll need to install it.

How to Install the Official PIXEL Desktop on Raspberry Pi OS Lite

Deciding to install a desktop on Raspberry Pi OS Lite isn’t unusual. Consequently, the instructions for doing so are relatively straightforward.

At the prompt, enter:

        sudo apt install xserver-xorg raspberrypi-ui-mods
    

Tap Y when prompted to confirm the installation. Note that this can take a while, but no further interaction is required, so you can occupy yourself elsewhere until completion.

Raspberry Pi OS PIXEL desktop

Once the basic desktop is installed, use

        startx
    

...to boot into the desktop UI. If you prefer to boot into the desktop permanently:

  1. Run sudo raspi-config
  2. Select System Options
  3. Choose Boot/Auto Login
  4. Select Desktop or Desktop Autologin depending on preference
  5. Select Finish, then Reboot when prompted

To exit to the command line (as opposed to running a Terminal window), press Ctrl+Alt+F2. This will exit the desktop environment immediately dropping you back in the text-based command line interface.

You can also undo permanently booting into the desktop:

  1. Run sudo raspi-config
  2. Select System Options
  3. Choose Boot/Auto Login
  4. Select Console or Console Autologin depending on preference
  5. Select Finish, then Reboot when prompted

(The above can also be done in the desktop using the Raspberry Pi Configuration tool. Select System > Boot choose between To desktop and To CLI.)

BONUS: How to Install GNOME on Raspberry Pi OS Lite

What if you wanted to install a completely different desktop environment on Raspberry Pi OS Lite? Plenty of alternatives are available, but for a typically modern Linux look, GNOME is a strong contender.

GNOME desktop on Raspberry Pi

Better still, it’s relatively straightforward to install on Raspberry Pi OS Lite. Note, however, that this is more suited to the 64-bit version of Raspberry Pi OS Lite. In fact, it probably won’t be usable on the 32-bit version.

To do this, enter:

        wget https://github.com/TerraGitHuB/gnomeforpi/archive/refs/heads/stable.zip
    

Then unpack the ZIP file:

        unzip stable.zip
    

Change directory:

        cd gnomeforpi-stable
    

Finally, run the installation script. You have two choices here:

  • sudo ./gnomeforpi-install
  • sudo ./gnomeforpi-install –lite

If you select the first, the standard installation will be used; with the second, fewer packages are installed, making the process faster. For example, Chromium browser is installed with the full option. Whichever you choose, installation is going to take a few minutes to complete.

Midway through the process, you’ll be prompted to choose between the following as the default display manager

  • gdm3
  • lightdm

Either option is fine, but you may prefer gdm3 as this is designed for use with GNOME.

The Raspberry Pi should automatically reboot. At the login screen, you can use your usual credentials, but log in with the Xorg display server. To do this:

  1. Click the Settings cog
  2. Choose GNOME on Xorg
  3. Enter your credentials
  4. Click OK

You should now see the GNOME desktop running on your Raspberry Pi.

Installing a Desktop Environment on Raspberry Pi OS Lite Is Easy

The most important thing to take from this is that while reinstalling your Pi’s SD card with a full OS might seem easier, it isn’t. It takes just a couple of minutes to install a desktop environment on the Raspberry Pi OS Lite. That makes it a far quicker solution, and one that doesn’t overwrite any saved data on the device.

Better still, you’re not limited to the default PIXEL desktop as many other desktop environments can be installed on Raspberry Pi OS.