I have had a few Linux VMs laying around for a while. Sometimes the best tool for the job is another distro and having your tools on hand is vital.

It is actually rather hard to think back to a time when spinning up a virtual machine locally was not just an accepted part of everyday computing. I clearly recall when using another operating system meant physically moving to another computer. Then practical boot loaders made living between worlds far more manageable. Not all that long ago, running a local hypervisor on top of your native OS was either cutting-edge experimental and nothing actually supported it, or prohibitively expensive for your average schlub due to the licensing costs of the virtualization software and the hardware powerful enough to run it.

Today virtualization is actually part of most operating systems at one level or another. And anyone can download VirtualBox for free or get a noncommercial, personal use license for VMWare. Literally running one OS on top of another is so useful that we take it for granted. But with historical perspective it is astounding how such mind-boggling complexity is now so mundane that there are projects out there just to make sure Doom can run on any platform.

But there is something satisfying about running on bare metal. Maybe it is partly my generation, but actually having to make that physical shift from one machine to another, while tedious, can force a context switch. And when you look at your machines as purpose-built, they stay less cluttered and focused on one task. We live in a world of constant distraction and it is nice to have tools that remove some of that distraction.

So I finally did some dusting and office rearrangement to find a place for my old iMac and got to work installing Linux. My purposes were twofold. One was to just have a good Ubuntu machine always available on my network to leave various services running and be somewhere where I can test any ’nix based application that I might need. The second was to serve as a nice terminal for my PiDP-8/I. Sure, I can SSH into it from anywhere and I will readily admit there is perverse pleasure in remoting into a 50+ year old operating system from my iPad. But the giant, unadorned screen of the iMac was just begging to run Retro Cool Term to serve as an oversized, faux CRT terminal. In amber, of course.

Linux Mint on the old iMac rocking my favorite vintage emulators

There is not a lot to say about installing Linux on an iMac. If you want to, it is easy enough to do and there are countless tutorials that will do a better job since there are much bigger nerds out there than I. But here are a couple of pointers based on my own experience.

Have a macOS Backup

If you want to ever go back, make sure you have a way to do so. If your Mac is really old and you still have an optical drive and discs, great. I think Snow Leopard was the last to issue the OS on disc. However, if you want to be able to use the machine as a Mac again with a more up-to-date OS, your Tiger install disc won’t do you much good.

I haven’t seen this desktop in years.

In the end, you need an installer for whatever version of macOS you want. If you are using a modern Mac and need a version in the last five years or so, things are pretty easy and you can follow instructions on Apple’s website to create an installation USB drive.

However this only covers the latest California OS versions. If you need an earlier or big cat version, you have to get a bit creative. A few years ago, you could just look at your purchase history in the App Store and download old installers. In testing El Capitan for example, I could see all of my macOS purchase history and could grab updates all the way back to Lion. Luckily you can still download El Capitan from Apple.

If for whatever reason your purchase history doesn’t go that far back, you can still purchase a Lion image from Apple.

For other versions you may have to dive into the attic to find your old installation DVDs. eBay has plenty of old discs as well and word on the street is that you can ask for an image of old versions at your local Mac store.

Just keep in mind that some images may be old. I ran into a problem trying to install Mavericks on my old iMac and kept getting the message “no packages were eligible for install” during the installation. I knew it was a valid image because I had archived it myself years ago. It turned out that the signing certificate was expired. Changing the system date solves the problem. Just start a terminal session either from your current OS or if you are in the installer cancel and choose Terminal from the menu and use the date command.

VNCing into your Linux Mac

I run VNC Viewer to connect to my various Raspberry Pis. I thought I would do the same with my new Linux Mac. However I ran into snag that, though not unique to Linux Macs, I though might be useful to share.

In Ubuntu and other distros, screen sharing is baked in and is implemented with Vino. However it appears that RealVNC encryption is not supported when connecting to a Linux machine from Windows or Mac resulting in an error “Unable to connect to VNC Server using your chosen security setting. Either upgrade VNC Server to a more recent version from RealVNC, or select a weaker level of encryption.”

Unfortunately this means you have to disable VNC encryption on the Linux machine to work around this.

gsettings set org.gnome.Vino require-encryption false

Don’t sudo this. It needs to be done by the user.

You can use dconf to check this at the path

org / gnome / desktop / remote-access

Disabling means that VNC traffic is unencrypted (though authentication using password is still encrypted). Maybe you feel comfortable doing this on your home network, but I like to set up an SSH tunnel to route all of this unencrypted traffic through.

ssh -L 61000:localhost:5900 -N -l username VNC_server_IP

-L defines forwarding, in this case from local 61000 to remote 5901

-N only forwards ports, does not execute commands

-l username to create the tunnel

Then just open a VNC connection using localhost:61000 as the server to connect to. The terminal used to connect to SSH will remain blocked as long as the connection is open. Terminate with ctrl-C.

You can use the same trick if you open up Termius or another terminal app on your iPad and use split screen to open VNC Viewer in the other part of the window. You have to show both running because as soon as Termius is off the screen it is suspended along with its connection.