In this post, we’ll be looking at creating a Xubuntu desktop with a cloud-init configuration, on a Raspberry Pi.
Xubuntu is another lightweight flavour of Ubuntu (similar to Lubuntu in this respect), but based on XFCE (a GTK based environment). Subjectively, I couldn’t discern much difference in performance between Lubuntu and Xubuntu. Other than the positioning of the application bar at the top of the screen (compared to Lubuntu’s traditional bottom placement), things felt pretty similar.
On the functionality side of things, the incorrect audio output appeared as in Lubuntu, but was trivial to work around. Out of the box, music playback from the network worked thanks to the inclusion of the excellent Rhythmbox . Video playback worked well with the Parole player, but unfortunately it didn’t seem able to playback from an SMB network share unless it was mounted.
This is one of those “integration” things; the file browser (Thunar), and most file-open dialogs, will happily browse to an SMB share and will appear to open the file. But then an error appears or, worse, nothing happens. Of course, the solution in this case is simple: sudo apt install vlc and it Just Works.
On the subject of bugs, remember I mentioned screen-savers? The lock-screen would happily kick in and blank the monitor, but wouldn’t suspend it (presumably LP: #1998716 again?). However, attempting to unlock (wiggling the mouse or hitting a key to bring up the login screen) gave the poor thing conniptions. The password prompt would briefly flicker into life, then the screen would blank again. Then flicker into life, then blank. Password entry wouldn’t work while all this was going on (something crashing?). After this happened several (4 or 5?) times, it seemed to get a grip on itself and allow login once more, but it’s rather broken! I’ll try and find some time to dig out some more useful info for a bug report (like whether this is specific to my monitor).
Everything else was pretty much as expected: I could read PDFs, print things, open links, browse the web, manipulate the file-system, use the terminal, all without issue, and all reasonably smoothly.
One amusing stand-out I did notice: the choice of bundled desktop games! On most desktops, this is pretty bland fare. Some variation of Klondike solitaire, maybe a Minesweeper clone, perhaps a Sudoku implementation. But not here! No, Xubuntu bundles one single game package , but it’s packed with more fiendishly fun entertainment than all the other default desktop gaming packages put together: Simon Tatham’s Puzzles (if you haven’t played these before, you owe it to yourself to sudo apt install sgt-launcher and give them a whirl).
It’s pretty (rather more so that Lubuntu in my opinion), lightweight, responsive and reasonably functional. However, it’s got a few more bugs than Lubuntu (the screen-saver particularly) so given the choice I’d probably go with Lubuntu for a light-weight choice. Still … a brilliant selection of games!
For Xubuntu, the configurations I used were as follows. For the boot configuration, highlighted lines are those changed from the lunar defaults:
1[all] 2kernel=vmlinuz 3cmdline=cmdline.txt 4initramfs initrd.img followkernel 5 6[pi4] 7max_framebuffers=2 8arm_boost=1 9 10[all] 11# Enable the audio output, I2C and SPI interfaces on the GPIO header. As these 12# parameters related to the base device-tree they must appear *before* any 13# other dtoverlay= specification 14dtparam=audio=on 15dtparam=i2c_arm=on 16dtparam=spi=on 17 18# Comment out the following line if the edges of the desktop appear outside 19# the edges of your display 20disable_overscan=1 21 22# If you have issues with audio, you may try uncommenting the following line 23# which forces the HDMI output into HDMI mode instead of DVI (which doesn't 24# support audio output) 25#hdmi_drive=2 26 27# Enable the serial pins 28#enable_uart=1 29 30# Autoload overlays for any recognized cameras or displays that are attached 31# to the CSI/DSI ports. Please note this is for libcamera support, *not* for 32# the legacy camera stack 33camera_auto_detect=1 34display_auto_detect=1 35 36# Config settings specific to arm64 37arm_64bit=1 38dtoverlay=dwc2 39 40[cm4] 41# Enable the USB2 outputs on the IO board (assuming your CM4 is plugged into 42# such a board) 43dtoverlay=dwc2,dr_mode=host 44 45[all] 46dtoverlay=vc4-kms-v3d
For the kernel command line, the entire file must consist of a single line of text so I would suggest simply copying this wholesale:
1zswap.enabled=1 zswap.zpool=z3fold zswap.compressor=zstd dwc_otg.lpm_enable=0 console=tty1 root=LABEL=writable rootfstype=ext4 rootwait fixrtc quiet splash
For the cloud-init configuration, the highlighted lines are those that you may wish to change after copying the content:
1#cloud-config 2 3hostname: xubuntu-pi 4 5locale: en_GB.UTF-8 6timezone: Europe/London 7 8keyboard: 9 model: pc105 10 layout: gb 11 12user: 13 name: "dave" 14 lock_passwd: false 15 gecos: "Dave Jones" 16 plain_text_passwd: raspberry 17 sudo: "ALL=(ALL:ALL) ALL" 18 19ssh_import_id: 20 - lp:waveform 21 22apt: 23 sources: 24 mozillateam: 25 source: 'ppa:mozillateam/ppa' 26 27write_files: 28 - path: /etc/apt/preferences.d/firefox 29 content: | 30 Package: firefox* 31 Pin: release o=LP-PPA-mozillateam 32 Pin-Priority: 501 33 34 Package: firefox* 35 Pin: release o=Ubuntu 36 Pin-Priority: -1 37 - path: /home/dave/.profile 38 append: true 39 defer: true 40 content: | 41 export MOZ_ENABLE_WAYLAND=1 42 43package_update: true 44package_upgrade: true 45package_reboot_if_required: true 46 47packages: 48 - xubuntu-desktop 49 - ubuntu-raspi-settings-desktop 50 - firefox
Finally, the networking configuration. I used Ethernet for my experiments, and given the number of packages that need installing I’d generally recommend that too. Please see the intro post for important information on adjusting the network configuration to Network Manager post installation:
1network: 2 version: 2 3 ethernets: 4 eth0: 5 dhcp4: true 6 optional: true
|||Rhythmbox is probably my favourite part of the entire GNOME project. It’s genuinely superb: supports every protocol and format I’ve ever needed (and several I haven’t), has a UI that’s minimal but fantastically functional, and most of all fast. Want to navigate your way through ~8000 songs spread over ~500 albums? No problem, even on a Pi! It’s one of the four applications that I reliably fire up every single day.|
|||That I could see; the seed seems to suggest it ships the GNOME implementations of Mines and Sudoku too but they didn’t appear in the start menu.|