In this project, I will be putting a vintage Apple Macintosh to use with Linux and Raspberry Pi!
My latest purchase. The Powermac G4. Stylish. Powerful (For 2001). Completely impractical in 2021.
Why did I get it? Because it looks cool, and I really like the late 90’s/early 2000’s design of Apple’s hardware. It’s all translucent and cool.
There’s still a lot of good software for these old macs – and the simplicity of them is kind of nice, so I thought – could I use one for modern day-to-day tasks?
The answer was pretty much yes – except for email and web browsing. This is my attempt (and failure, and consolation prize) to remedy that, using a Raspberry Pi and Linux.
But first – why not check out some of my other projects:
- Python Powered Tank!
- Smart Mirror
- Wikipedia Scraper
- Photo Resizer and watermarker
- Raspberry Pi Powered Palmtop/Laptop
The Powermac G4
Here’s the specs for this ancient beast:
A massive 256MB of memory and a 400Mhz PowerPC G4 Processor. I’ve kitted it out with a compact flash card in place of the old spinning IDE hard disk to cut down on the noise.
In hindsight, I probably should have dropped the resolution while taking screenshots.
MacOS 9
I really like MacOS 9. It’s understated, keeps out of the way while I do things, minimalist.
Then it crashes for no reason because it has no memory protection or true multitasking, and some application has installed a system extension that conflicts with another, and I have to reboot YET AGAIN.
Still, it looks neat and is a bit of fun to use. A callback to a simpler time where notifications didn’t ping at you constantly, and icons didn’t bounce around trying to draw your attention away from what you’re trying to actually do.
Software for macOS 9
As MacOS 9 was retired the better part of two decades ago, most of the software is considered abandoned and available freely on the internet (free doesn’t necessarily mean legal, but it seems that blind eyes are turned).
Office & productivity, graphics, audio tools, and even games are all available. They’re pretty usable – in some cases, simple tools that feel less cluttered and bogged down with unnecessary online features than their modern iterations.
Web Browsing & Email
That is, except for web browsing and email clients.
There are no modern email clients (unless you want to use unencrypted mail protocols, and that’s a really bad idea – most mail hosts don’t even support them anymore anyway).
There are a few web browsers that are sort-of actively maintained. Still, they do no support many features required on the modern internet – the most popular and active browser for the Classic MacOS – Classilla – heavily limited by Javascript and CSS compatibility.
Networking
Even then, you probably shouldn’t connect your old mac directly to your home network.
With 20 years of unpatched security vulnerabilities and a 20-year-old unmaintained networking stack, who knows what it might do on your network.
The (Proposed) Solution – Raspberry Pi, Linux & X11
Linux uses the X Window System to draw content on the screen – buttons, windows, text, graphical elements – and it can also do it over a network – allowing you to run graphical applications that are being executed on a remote system and sending the screen output to your local computer over a network.
Could this be used to run a modern browser on the obsolete mac? This would let me essentially run Chromium as if it were running locally on the mac – but the code would actually be running on an attached Raspberry Pi – a modern and secure system.
The mac would only have to talk to the Pi and be otherwise isolated from my network.
SSH & MacX
A promising start – MacX is Apple’s X11 Client for Classic Mac operating systems, and it is easily found online for download.
MacSSH is an SSH client for Mac that supports X11 forwarding for running graphical applications remotely – and it’s also free.
So, I have the mac, an X11 client and an SSH client – let’s see if this can be done!
Setting up The Raspberry Pi
Raspberry Pi Lite was installed using:
https://www.raspberrypi.org/software/
WiFi and SSH were then set up so the Pi could be accessed remotely.
Then a Static IP address of:
10.0.0.201
…was assigned to the Raspberry Pi.
Setting up Networking on the Mac
The Mac and the Pi are directly connected with an ethernet cable, and each must have its own static IP address on the same network so that they can talk.
A static IP address of
10.0.0.202
…was assigned to the Mac by clicking on the Apple Icon in the top left corner and navigating to:
Settings > TCP/IP
A subnet mask of 255.255.255.0 was also given.
Setting up MacSSH and MacX
MacX
Now, X11!
I’ve downloaded and installed MacX for MacOS 9. It can be found online without much trouble.
MacX needs to be open in the background whenever an X11 application is launched from MacSSH.
MacSSH
Download and install MacSSH – available for free from:
http://chombier.free.fr/MacSSH/SSH_info.html
Open it up, then navigate from the menu bar:
Favourites > Edit Favourites > New
Below are all of the details to connect to the Pi via SSH as I have them filled out. The most relevant bits are:
General tab:
- Host Name 10.0.0.201
Security tab :
- Fill in username and password
SSH2 Tab;
- Check Forward X11
- Check Verbose and Debug as well to help with any troubleshooting
- Set Encryption and Authentication to All in Order – spray and pray!
- Compression to None
While I’m flooding the article with screenshots, here’s the MacSSH options as I have them:
From the menu bar, navigate:
Window > Show log
…to help with any troubleshooting. This can be closed later once things are working.
If you try and SSH to the Pi now, you’ll get errors like:
No common key exchange method
and/or:
Algorithm negotiation failed
…in the log window. This is because MacSSH is old, and the SSH server on the Pi needs some tweaking to work with it.
Configuring SSH on the Pi for Legacy Connection
X11 Forwarding
X11 forwarding is enabled in sshd_config on the pi by default.
Allowing SSH only from the Mac
The configuration changes below will make SSH insecure on the Pi – so SSH access will be limited to the wired network interface attached to the Mac – effectively disabling it from the Wireless network where it could be exploited.
Edit your SSH server config on the pi with the nano text editor by running:
sudo nano /etc/ssh/sshd_config
The ListenAddress line, when set to the IP address of the wired interface, will limit incoming connections to that interface only:
ListenAddress 10.0.0.201
Add the following to the end of the sshd_config file:
#Legacy Changes for MacSSH KexAlgorithms diffie-hellman-group1-sha1,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1 Ciphers 3des-cbc,aes128-cbc,aes128-ctr,aes256-ctr
To test the sshd config is valid, run:
sudo sshd -t
If no errors are returned, restart the SSH server – everything’s ready to go:
sudo service ssh restart
Testing SSH
SSHeven is an SSH client for macOS 9, which is, amazingly, still under active development. It’s a good way to test if SSH is working (it works even without the above legacy config changes) – however, it doesn’t support X11 forwarding (yet?).
Find it at:
https://github.com/cy384/ssheven
SSH Works!
Testing X
Now to test X11 forwarding. Run the following to install some X11 tools:
sudo apt update sudo apt upgrade sudo apt install x11-apps
This will have installed xclock – a simple clock program for X11. Run it from your SSH session:
xclock
And you should get a little clock confirming X11 forwarding works.
X11 Forwarding Works!
Browser Tryouts
Below is what happened when I tried a bunch of browsers over X11:
Chromium
A black window – but it’s promising – the application is launching!
Midori
A little more promising! A white screen with a window title appears.
At this point, I acknowledged what was probably obvious – modern software probably uses X11 features that probably don’t exist in this ancient version of X11.
Surf & Qutebrowser
So, I changed things up a bit and tried browsers that deliberately omitted any window decoration – Surf and Qutebrowser apparently forego this and supply a WebKit render of the page and keyboard navigation.
The result – nothing. Just blank windows.
Xnest and Xephyr
I decided to try something else – could I proxy the X11 session through a more modern version of X11 and have that draw to my old version on the Mac?
Xephyr and Xnest apparently do just that.
I was able to get xclock running via Xephyr, but little else.
Midori With xnest almost did something, but it wasn’t usable.
Close to giving up, I tried one more browser, advertised as incredibly low-weight – Dillo.
So close! But it isn’t really drawing well, and keyboard input is mangled, probably due to not having localization options set for whatever I’m doing in xnest.
Winner Winner – Dillo Browser
So, I tried Dillo with plain old X11 forwarding and:
Colour and keyboard input! The window is also resizable if the correct MacX setting is set under the Window menu item.
OK, so it’s pretty busted up, but it’s still pretty cool. It works well enough for taking screenshots, at least.
Most importantly – the mac is still 100% isolated from the rest of the world by the pi.
Mail Client
I mentioned trying to get a mail client to work, I had even less success than I did with the web browsers, so I’m skipping it as this article is a long enough list of my failures as it is.
Actual Practical Uses
This project wasn’t really a success, but it was still fun to explore. I could still get an SSH session going to the Raspberry Pi, so the full range of Linux command-line tools are now available to me from my Powermac – all without exposing it to my actual network.
Netatalk
netatalk is a package that provides legacy apple file shares, so I could use that as a bridge to share files from my other devices to the Mac.
VNC
Yes, I could have just used VNC to run a remote desktop from the Mac, but that felt like cheating.
Three Frags Left
Now for some Quake 3. With that mouse, I doubt I’ll be beating even the practice bots.