using cockpit with a raspberry pi 4b

I’ve placed several Raspberry Pies around my house, and they’re all headless. That means no attached screen, keyboard, or mouse. In the past when I set up a headless system that meant logging into them via SSH. That was OK, but there were times when I wished for some bit of a graphical desktop. Then along came Cockpit.

Cockpit ( https://cockpit-project.org/ ) is a web-based graphical interface for remote system management, whether it’s sitting somewhere else with a screen, keyboard, and mouse, or else it’s a headless system away from you. Cockpit is an installable package for just about every Linux distribution under the sun, including Raspian. You can follow the setup and operational directions at the Cockpit home page.

Cockpit’s very complete and is capable of giving you, the remote user, complete insight into a remote system all within your browser of choice. I can’t speak to all browsers, but I’ve tested it with Firefox (this example is running on macOS Catalina and a 2012 Mac Mini Server), Chrome, Safari, and Vivaldi. When I do use Cockpit I always leave it open on the terminal.

The terminal page in Cockpit is a full-blown terminal. I haven’t found an ASCII application or tool yet that I couldn’t run within that terminal. That includes complex tools such as htop and btop. Since I’ve been using Cockpit, I’ve had no need to ssh into the system.

updating raspberry pi 4 8gib to raspberry pi os

It’s been a good eighteen months since I worked with anything other than Pycom and Arduino in support of my paying project. I’ve certainly benefited from this effort, both intellectually and financially, but right now heading into Christmas and 2022, I need a diversion to help recharge the creative battery, and I need to go back and check the state of a number of my older projects. I combined the two efforts into one by checking on my Raspberry Pi 4 systems.

First thing to note is that the last time I logged into the Pi was back in June 2020. As soon as the Pi powered up and I logged in I tried the usual sudo apt update && sudo apt upgrade dance. And it failed. To make a long story short, I did manage to do a full upgrade to the latest 64-bit version of Raspberry Pi OS, the version built with Debian 11/bullseye. But it was seriously squirrelly in operation.

I backed up the pi account and development areas from the older card to a thumb drive, downloaded the latest image from  https://downloads.raspberrypi.org/raspios_arm64/images/ , performed a clean install of Raspberry Pi OS 64-bit using balenaEtcher ( https://www.balena.io/etcher/ ) onto a Sandisk Extreme 128GB micro SDXC card, rebooted with the new card, then copied everything back over, and carried on from there.

In the middle of doing all of that I took some additional time to try a few new distributions aimed squarely at the Raspberry Pi 4. They were Ubuntu 21.10 for IoT, Fedora 35 for IoT, and Pop!_Pi for Raspberry Pi 4. Here’s what happened with each to keep me still on Raspbian.

  1. Ubuntu 21.10 for IoT was perhaps the cleanest install of the three. It was no problem to flash and boot into Ubuntu. The critical feature on boot is for the OS to automatically resize the boot partition. Raspbian does it, and so does Ubuntu for IoT. My problem with Ubuntu on the RPi 4 8GiB is sloppy performance. At one point I attempted to drag-and-drop an application icon onto the Ubuntu dock. It’s a habit I developed using macOS and Windows (10 and earlier). Under Ubuntu you have to right-click on the app icon and select on the resultant menu to add the icon to the dock. My drag-and-drop attempt locked the Ubuntu desktop up solidly. After waiting a few minutes to see if it would ever come back, I pulled power and then the card and wiped it clean for the next experiment.
  2. Fedora 35 for IoT wouldn’t boot into a graphical desktop. I have a feeling that Fedora 35 for IoT hasn’t a decent driver to use my LG 34UM61-P, a 34″ diagonal 21:9 UltraWide┬« monitor. All the other distributions can find and use this monitor, but apparently Fedora 35 for IoT can’t. Once again, wipe and reload.
  3. Pop!_Pi for Raspberry Pi 4 was an interesting alternative I hoped would work out. It booted just fine, had reasonable performance, but it lacked one vital feature. It currently won’t resize the boot partition and it has no tool like raspi_config to allow you to manually do it yourself. I liked the way it looked and worked. I would have loved to have kept it, but it was not to be.

I’m back to doing some personal work on the current Raspberry Pi OS. The tools are up-to-date, especially Python3, and Python2 is not completely gone. I’ve got the last Go and Rust, and between those three I’m keeping busy. In fact, right now I’m moving all my little Go work over to modules. So far I’ve not hit any roadblocks. Once done I’ll check that in, and then move on to more physical computing.