I recently installed Ubuntu Server 23.04 headless on a Raspberry Pi4B and installed the Gnome Desktop on it. I’m sharing my experience in case someone needs a reference. My goal was to access the Ubuntu Server on the Raspberry Pi with an RDP viewer remotely from a Windows desktop.
Hardware/Software Requirements:
- Raspberry Pi Imager 1.7.4
- Raspberry Pi4B with power cable
- Micro SD card and card writer
Here are steps what I did:
- Create Ubuntu Server 23.04 OS to SD card with Pi Imager 17.5.4
- Update WiFi SSID and Password from network-config file
- Start Ubuntu Server on Raspberry Pi
- Connect from Windows via SSH
- Install Gnome Desktop via Tasksel
- Install XRDP
- Access Ubuntu Server from Windows Desktop with RDP.
Let’s start.
Download Raspberry Pi Imager 1.7.4
Download Raspberry Pi Imager from https://www.raspberrypi.com/software/ and install in Windows Desktop. Prepare the Micro SD card. I used Memax 16 GB Classic 10.
Write Ubuntu Server 23.04 OS to Micro SD Card
Open Pi Imager, click on the “CHOOSE OS” button. From the Operating System list, choose “Other general-purpose OS”.
And choose Ubuntu > Ubuntu Server 23.04 64bit.
After finishing OS choosing step, select the USB SD card from storage.
Next step is important for headless installation. Press Ctrl+Shif+X to show advanced option to configured WiFi SSID and SSH connection.
Select hostname checkbox and type the host name what you want. It is optional for this testing.
Select Enable SSH checkbox and choose “Use password authentication” option. It is mandatory for our testing. Because we will access Ubuntu OS and do configuration without monitor (headless)
Go down to configure user name and password. Select “Set username and password” checkbox and key-in your desire user name and password.
And also select “Configure wifi” checkbox and key-in SSID name and password. Be careful, you should choose right WiFi SSID 2.4 GHz or 5 GHz depend on your raspberry supported WiFi. In my testing I choosed 2.4 GHz WiFi.
Go down to select locale settings. Choose WiFi country, and select “Set locale settings” and choose correct Time zone and keyboard layout.
After that, just click “Save” button and “Write” button to write the OS to SD card.
Pi Imager will writ to SD card.
After finished writing, get Micro SD card and insert to Raspberry PI and start the power on.
Start SSH connection to Ubuntu Server
After Ubuntu OS is started, you can see Raspberry Pi IP address from your router control panel. Ubuntu OS is connected to WiFi router as per your configuration in Pi Imager. Now we can connect to Ubuntu by using SSH.
Open windows command and connect to Raspberry Pi with SSH command
> ssh UserName@IPAddress
You need to agree SHA256 for SSH connection and need provide password. After that you can connect to Raspberry Pi via SSH.
Before install anything, better to update and upgrade with
$ sudo apt update & upgrade -y
Installing Gnome-Desktop
Now we can install Gnome-Desktop for GUI on Ubuntu Server 23.04. Easy way to install Gnome Desktop is using Tasksel. Install Tasksel first.
$ sudo apt install tasksel
After that run sudo tasksel to start Gnome Desktop installation
sudo tasksel
From Tasksel Package Configuration > Software Selection popup, choose GNOME and select OK.
Tasksel will install Gnome-Desktop on Ubuntu Server 23.04.
Installing XRDP
Next step is installing XRDP service for remote desktop connection from Windows Desktop.
sudo apt install xrdp
sudo systemctl enable xrdp
Rebooting Ubuntu Server
sudo reboo
Now Ubuntu Server 23.04 is ready to connect from Windows Desktop.
Now, Ubuntu Server 23.04 is ready to connect from a Windows desktop. Based on this experiment, Ubuntu Server 23.04 with Gnome-Desktop on Raspberry Pi4B 8 GB is quite slow via XRDP session. However, the installation steps are quite easy and smooth.
Thank you for reading!