Install Xubuntu 20.04, 21.10, or 22.04 on Raspberry Pi 4

Install Xubuntu 20.04, 21.10, or 22.04 on Raspberry Pi 4

Table of Contents

Introduction

The Raspberry Pi 4 and 400 are capable ARM devices that run a desktop-class operating system, albeit slowly. Ubuntu has a tutorial for installing a desktop on the Raspberry Pi, but I recommend using Martin Wimpress’ desktopify script to install with improved hardware support. In this guide, I’ll use a patched version that enables you to install Xubuntu on Raspberry Pi.

Please note that the Xubuntu Team does not support the Raspberry Pi. This installation method is made available for those looking for something different to use their Raspberry Pi for or those needing to test against ARM hardware.

With this guide, you will

  1. Download your preferred Ubuntu version (20.04, 21.10, 22.04)
  2. Use GNOME Disks or the Raspberry Pi Imager to flash Ubuntu onto an SD card
  3. Use a patched desktopify script to install Xubuntu or Xubuntu Core on your Raspberry Pi 4

Download Ubuntu Server

There are several Raspberry Pi images to choose from. Select the 64-bit ARM option.
There are several Raspberry Pi images to choose from. Select the 64-bit ARM option.

Download the Raspberry Pi Generic (64-bit ARM) preinstalled server image for your selected Ubuntu version. You should end up with a filename ending in -preinstalled-server-arm64+raspi.img.xz

Download links for Ubuntu 20.04 and 22.04 are available.

Prepare the SD Card

⚠️ Warning: The next steps will erase all content on your SD card. Be sure to confirm the device you’re overwriting to prevent wiping importing data.

Insert your SD card into your computer. Then select your installation method below.

Option 1. GNOME Disks

If you’re installing from GNOME or Xubuntu, you already have Disks installed.

  1. Select the SD card in the Disks sidebar.
  2. Click the dots menu button in the upper right corner.
  3. Select Restore Disk Image…
  4. Click the button next to Image to Restore and navigate to your img.xz file. Click Start Restoring…
  5. Confirm your device one last time and click Restore. Authenticate with your password if requested.
  6. After some time, the SD card should be successfully flashed.

Install the Raspberry Pi image in 6 steps using GNOME Disks.

Select the SD card in the `Disks` sidebar.
Select the SD card in the `Disks` sidebar.
Click the `dots` menu button in the upper right corner. Select `Restore Disk Image…`
Click the `dots` menu button in the upper right corner. Select `Restore Disk Image…`
Click the button next to `Image to Restore` and navigate to your `img.xz` file. Click `Start Restoring…`
Click the button next to `Image to Restore` and navigate to your `img.xz` file. Click `Start Restoring…`
Confirm your device one last time and click `Restore`.
Confirm your device one last time and click `Restore`.
Authenticate with your password if requested.
Authenticate with your password if requested.
After some time, the SD card should be successfully flashed.
After some time, the SD card should be successfully flashed.

Option 2. Raspberry Pi Imager

Download and install the Raspberry Pi Imager for Windows, macOS, or Ubuntu/Debian.

Windows

macOS

Ubuntu

Once installed, you will find Imager in your applications menu/launcher.

  1. Under Operating System, click Choose OS.
  2. Scroll to the bottom option, Use custom, and click it. Navigate to and select your img.xz file.
  3. Click Choose Storage under Storage.
  4. Carefully select your SD card from the list.
  5. Click Write.
  6. Click Yes on the confirmation dialog to proceed. Authenticate with your password if requested.
  7. After some time, the SD card should be successfully flashed.

Install the Raspberry Pi image in 9 steps using Raspberry Pi Imager.

Under `Operating System`, click `Choose OS`.
Under `Operating System`, click `Choose OS`.
Scroll to the bottom option, `Use custom`, and click it. Navigate to and select your `img.xz` file.
Scroll to the bottom option, `Use custom`, and click it. Navigate to and select your `img.xz` file.
Click `Choose Storage` under `Storage`.
Click `Choose Storage` under `Storage`.
Carefully select your SD card from the list.
Carefully select your SD card from the list.
Click `Write`.
Click `Write`.
Click `Yes` on the confirmation dialog to proceed.
Click `Yes` on the confirmation dialog to proceed.
Authenticate with your password if requested.
Authenticate with your password if requested.
A progress bar is displayed while the image is written to your SD card.
A progress bar is displayed while the image is written to your SD card.
After some time, the SD card should be successfully flashed.
After some time, the SD card should be successfully flashed.

(Optional) Configure your network

With the SD card still inserted, you should now be able to access the system-boot partition. Navigate to the network-config file on system-boot and open it in a text editor. Here you can configure the Ethernet settings and add Wi-Fi credentials. Some key details:

  • Uncomment the sections you want to use by removing the “#” at the beginning of each line.
  • Each network name needs to be enclosed in quotation marks. E.g. “ My Wifi Network
  • On the first boot, the Wi-Fi network will fail to connect. Once you are successfully logged in, simply enter sudo reboot to restart the device.

Once you’ve finished, save your changes and eject your SD card.

Navigate to the `network-config` file on `system-boot` and open it in a text editor.
Navigate to the `network-config` file on `system-boot` and open it in a text editor.
Uncomment the sections you want to use by removing the "#" at the beginning of each line.
Uncomment the sections you want to use by removing the "#" at the beginning of each line.

Install Xubuntu

Install and update Ubuntu Server

Insert your SD card into the Raspberry Pi and power it on. The first boot takes a few minutes while the writable partition is expanded to fit the remaining space on the SD card. You are ready to log in once a few minutes have passed or you see a message about SSH keys.

Once your SSH host keys (redacted) are displayed, you will be ready to log in.
Once your SSH host keys (redacted) are displayed, you will be ready to log in.

Use ubuntu as both the username and password. You will be prompted to change your password immediately. Afterward, you will be logged in. Reboot now if you need your Wi-Fi connection to work with sudo reboot and then log in again.

Type 'ubuntu' and click the Enter key to enter your username. Type 'ubuntu' and click the Enter key again to enter your password. Then follow the prompts to set your password.
Type 'ubuntu' and click the Enter key to enter your username. Type 'ubuntu' and click the Enter key again to enter your password. Then follow the prompts to set your password.

Time to run updates! Issue the following commands to update your device fully.

sudo apt update
sudo apt dist-upgrade

This will take a while; make some coffee. Once updates are complete, reboot your device with sudo reboot. Log in again, and it’s time to install Xubuntu or Xubuntu Core with desktopify.

Install Xubuntu with desktopify

Using the patched desktopify script, you can now install Xubuntu or Xubuntu Core on your Raspberry Pi 4. Select one or the other, but don’t try to install both. Xubuntu Core is a subset of Xubuntu, so it probably wouldn’t do anything anyway.

Note: The —oem flag is optional but recommended. Without it, you must change the hostname and add a new user.

# Get the desktopify repository
git clone https://github.com/bluesabre/desktopify.git

# Switch to the desktopify directory
cd desktopify

# Install Xubuntu, or
sudo ./desktopify --de xubuntu --oem

# Install Xubuntu Core
sudo ./desktopify --de xubuntu-core --oem

Once this process is completed, reboot once more with sudo reboot. On the next boot, your device will be running Xubuntu!

The Ubuntu Server commandline, ready to finish the Xubuntu installation.
The Ubuntu Server commandline, ready to finish the Xubuntu installation.

Post Installation

If you opt for the OEM installation option, you’ll first be greeted with the Ubiquity one-time device setup. Enter your details and wait a bit longer, and you’ll be ready to log in with your new username and password.

The OEM installation wizard.
The OEM installation wizard.

If you did not use the OEM installation option, your password is the same as the one you set when you first started the Raspberry Pi.

Xubuntu was successfully installed on the Raspberry Pi 4.
Xubuntu was successfully installed on the Raspberry Pi 4.

Enjoy Xubuntu on the Raspberry Pi, but remember that it is an unsupported device. Performance issues and missing hardware features are to be expected and are unlikely to be addressed by the team. Despite this, please report issues as you normally would! Issues reported may be common with other hardware and can potentially be addressed by the Ubuntu development team or upstream projects.

comments powered by Disqus

Related Posts

Xfce PulseAudio Plugin 0.3.3 Released

Xfce PulseAudio Plugin 0.3.3 Released

Xfce PulseAudio Plugin 0.3.3 has been released with support for multimedia keys, a simplified device menu, improved volume scaling, and more.

Read More
Exo 0.11.4 Released

Exo 0.11.4 Released

Exo 0.11.4 completes the GTK+ 3 migration and can now be used for GTK+ 2 or GTK+ 3 Xfce application development.

Read More
Xfce PulseAudio Plugin 0.3.5 Released

Xfce PulseAudio Plugin 0.3.5 Released

Xfce PulseAudio Plugin 0.3.5 has been released with some usability and bug fixes, so users will find the latest release easy and convenient.

Read More