Install Raspberry Pi OS's desktop environment over a Lite install

Almost every time I set up a Raspberry Pi these days, I use the 'Lite' version of Raspberry Pi OS. That version doesn't come with a GUI, it just boots to the console. It's much smaller in size and contains most things you'd need for a 'headless' Pi setup.

And if you know your way around the command line, it's not daunting to plug in a monitor, keyboard, and mouse, and explore via the shell if you need to.

But every so often, I've had a Lite install that I wanted to switch to GUI, but I'm too lazy to pull the Pi out of wherever it's installed, pull the microSD card, and re-flash it with the full OS, and then re-run my automation on it to set up whatever I had running before.

And that's why it's nice to be able to just install the GUI on top of an existing Lite install!

To do that (assuming you're running the latest Pi OS version, Bullseye as of this writing), just install Xorg and the Raspberry Pi 'PIXEL' environment:

sudo apt install xserver-xorg raspberrypi-ui-mods

Then run sudo raspi-config and change the system boot option to boot to desktop, instead of the CLI. Then reboot, and you should be in the graphical environment!

There are other useful bits of software you can install if you want, like chromium-browser (which gives you a web browser), and arandr, which gives you the 'Screen Configuration' GUI, and you could even use an alternate desktop environment if you want—check out This raspberrytips.com article for more on that.

Comments

Just adding a note that for some reason I did not see the 'Pixel Doubling' option in any of the Pi's settings (not sure why, probably some other missing package), but you can set it any time in the console with:

xrandr --output HDMI-1 --scale 0.5x0.5

Use whichever HDMI output you are connected to. Note that this change does not survive a reboot.

Just saying, the BCM2711 supports a maximum of 8192Gb of RAM, this could be interesting........

She's being needlessly pedantic because the original post said "Gb" instead of "GB". "Gb" is gigabits, and there are 8 bits per byte, so there are 8192 gigabits in one terabyte.

I was about to run these commands on the new RPi OS Bookworm, but then I remembered reading that it uses Wayland, and these commands install xserver. So, this is no longer suitable for Bookworm?

Jeff Geerling to the rescue
thank you for all your hard work, man!