First time setting up a Pi. Only have basic familiarity with linux and operating systems. Right now I am doing the setup entirely with an ssd card and SSH. So if something prevents me from SSHing into the device I consider it "bricked" and start over.

What I am doing right now I thought is quite simple. I am trying to use Ubuntu Server with my Raspberry Pi 4 because I thought that would lead to wider compatibility with libraries/programs that exist in the linux community. I figured since I am familiar with bash it would be fine.

I realize the Raspberry Pi OS already has VNC built in but I really want to learn what is going on with Linux so I am purposefully making my life a bit difficult. Please when you answer feel free to explain in as much detail what I might want to know, would love to know more than just how to fix this.

So what I do is the following

  1. Install Ubuntu Server 64 bit onto my micro SD card configured with SSH via the Raspberry Pi Imager
  2. Run the command I got from here sudo apt install xfce4 xfce4-goodies in hopes of installing VNC.
  3. This command runs for a long time (hour or two) but eventually finishes.
  4. If I am connected over SSH and leave the computer alone the ssh pipe will break. I can't ssh back in even after power cycling.
  5. If I keep with the computer SSH does something I have never seen before and somehow gives a full screen GUI warning me about Needsrestart.

And that's about where I'm at. A few observations I guess:

  1. If I connect the sd to my computer and try to open etc/bin/bash in a text editor it is un-intelligable. Same with zsh. Many tutorials mention I might be able to edit these files to boot into safe mode, get out diagnostic info etc.

  2. I have never before seen a full screen GUI pop up in vnc (except for like text editors and gdb). It's a purple screen with like an alert. And it will list like 2 things and say ok. I think it's something about Needsrestart or Daemons using outdated libraries. This pops up after the installation. I believe it just asks me to restart certain things.

  3. Is there no way I can get to the logs/ssh history for the device from looking at the micro SD card on Ubuntu? See what went wrong? Is this only a RaspberryPI OS thing?

  4. Part of me is wondering if it's an issue with the cheap but recommended AEGO Micro SD Card 32GB Mini sd Card UHS-1 Class 10 microsd 32gb I am using. I know SD cards aren't reliable. The first time this happened I had issues mounting it onto my Mac to wipe it. Couldn't first aid or anything. Had to use a different reader. However successive attempts have had the sd mount just fine. I don't really know how to tell if the SD failed.

  5. Is there any way to convince my Mac to keep the SSH pipe open so I don't have to baby sit it and can step away while it does this long install and still observe the state after? (ssh breaks after the install)

  6. This install seemed to create wider system issues. I remember ignoring the popup or just saying ok then having issues with other system things like when I tried to mess with ufw I got ERROR: '/etc/ufw/user.rules' is not writable could be unrelated. I may have messed up my users. I also couldn't install the script for my fan due to this error 'sudo apt-get install' is showing "Not using locking for read only file /var/lib/dpkg/lock" warning on Ubuntu Touch

  7. Is it possible that VNC is fundamentally incompatible with Ubuntu Server? I am using that because the Raspberry Pi Imager only allows me to set up the SSH login+wifi if I install server. I don't have a keyboard/monitor for using Desktop to connect it to wifi+setup log in and can't find instructions how to modify its boot to do that. I always figured I could "install" a GUI into ubuntu server. But perhaps it is just fundamentally incompatible to t

Any thoughts or tips would be greatly appreciated.

Edit: I was able to reproduce this issue on a DigitalOcean Ubuntu server. Or at least the purple screen. It looked just like this enter image description here

  • May be best to ask on the ubuntu forums ubuntuforums.org
    – CoderMike
    Sep 12, 2023 at 16:31
  • @CoderMike probably a good idea but Is that site still used/supported? It is hopelessly slow for me today. Like 10-20 second page load times. Figured maybe it is no longer used?
    – CalebK
    Sep 12, 2023 at 16:44
  • Just checked - last post 1 minute ago !
    – CoderMike
    Sep 12, 2023 at 16:58
  • Why do you want VNC on a server which doesn't have a GUI? Have you installed a Desktop environment and if so what?
    – Milliways
    Sep 14, 2023 at 0:33

1 Answer 1


First time setting up a Pi. Only have basic familiarity with linux and operating systems. [...] What I am doing right now I thought is quite simple. I am trying to use Ubuntu Server with my Raspberry Pi 4 because I thought that would lead to wider compatibility with libraries/programs that exist in the linux community.

You thought wrong. If you are new to both the Pi and Linux, you should use RpiOS for a few simple reasons:

  • It's released by the Pi Foundation, meaning the Pi related parts are as up to date as you can get, and (although there is an an x86(-64) version avaliable), it's intended specifically for the Pi as opposed to being a modification of a generic ARM distro.
  • The user community is far bigger than it is for any other distro, meaning there is much more support, on-line tutorials, etc.

About the only reason not to use it would be that it is derived from Debian, which has a conservative policy WRT software updates -- not that they are less often, but that they stick to versions that are a bit behind distros that try and keep everything updated to the latest version1. A justification for this is to keep the system more stable. Debian isn't the furthest back though; Redhat and derivatives CentOS and Scientific Linux are even more conservative and widely used where stability is paramount such as CERN facilities. I mention this to dispel worries that "conservative policy" means out-of-date or insecure (this is explained more in my footnote).

So unless you know of a concrete reason why you have to use Ubuntu or anything else, the additional hassles and lack of support/community are not worth it. I've been a power linux user since the late nineties, and my preferred distro is actually Fedora (which aims for cutting edge),2 but I gave up using it on Pis for those reasons.

  1. "A bit behind" is generally not more than a year or so with regard to the minor version. Most software on linux systems use a version triplet, major.minor.patch (eg. 3.2.10). WRT security and bug fixes, for most significant things the 3.2.x release continues to be updated with patches in parallel to the latest release. For example, although version 3.8.x was released yesterday, an updated 3.2.11 could be released tomorrow. There are cut-offs where this stops (eg., no more updates for 2.x), which Debian stays well ahead of.

  2. Historically there is a close relationship between Fedora and Redhat, one of the more conservative distros mentioned: Having a sort of opposite policy, Fedora serves as a "testing ground" for Redhat.

  • Really appreciate you writing this up because it is super helpful. I was mostly worried that downstream python packages I want to use won't work. But probably best to go the PI route and find out. Using Ubuntu has proved arduous and I am learning my lesson haha. Curious if you think this lagging hardware support could make things like invalid SD card writes more likely.
    – CalebK
    Sep 12, 2023 at 21:03
  • When I originally looked into it I thought that RaspberryPI OS was like the "guardrailed" version for people who really didn't want to do much with their Pis or weren't linux familiar. However I think that was a very wrong assumption.
    – CalebK
    Sep 12, 2023 at 21:04
  • @CalebK: Indeed, using Ubuntu on a RPi is almost always a bad idea.
    – Seamus
    Sep 13, 2023 at 20:19
  • @CalebK WRT python you can almost always get the package version you want by using pip instead of the distro package. There can be minor issues with that which you can probably avoid by using a virtual env, etc.
    – goldilocks
    Sep 14, 2023 at 14:10
  • WRT SD card issues, I don't really think so, based on the assumption that the SD card controller code is vanilla linux -- that might be incorrect though: The Pi 4 has a new controller, and I guess there is the issue of proper integration of the controller into the system. Historically, there was a driver issue at one time that helped fuel the proliferation of SD card madness in the Pi user community: hackaday.com/2022/03/09/…
    – goldilocks
    Sep 14, 2023 at 14:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.