How to run POSE in a Docker-Container on Mac OS X
07.05.2022
Since POSE is a very old 32-Bit application, which runs perfectly fine on Linux and Windows - even on current versions of these operating systems - it does not run on Mac OS X without heavy changes on the source code to make it 64-bit ready.
A reader of this website, Haemish Graham, tackled this problem and found a way to run POSE in a Docker container on Mac OS X. This was successfully tested on a new M1 (Apple Silicon). But of course it should also run on Intel Macs. Haemish used the following articles as a basis for this tutorial:
- How to Run GUI Applications in a Docker Container by James Walker
- Docker for Mac and GUI applications by Fredrik Averpil
- Compiling and building Palm-OS-Applications on Ubuntu 20.04 LTS (64 Bit)
- mounts a share of ~/Public on the host to /public on the container (put your roms, apps, sdks, docs here)
- contains a full build of the prc-tool-remix built for i386 (credit to Chuan Ji - jichu4n)
- adds the missing libraries required to run pilrcui (mostly from https://old-releases.ubuntu.com/releases/)
Haemish did build an image with docs, roms, apps, and sdks so that it was a self-contained project, but those choices are personal and can be individually customized:
palmos-docker.tar.gz
Of course, besides the tarball, also a Docker-Envoirement is requried.
The next steps also included in the readme.md of the tarball:
brew cask install xquartz - XQuartz can also be installed via a .dmg-file
brew install socat - Check if "DISPLAY" is available with
echo $DISPLAY It should look like this:/user/tmp/com.apple.launchd.ilkWi8QFfO/org.xquartz:0 docker-compose build reboot
The configuration looks like this:
socat TCP-LISTEN:6000,reuseaddr,fork UNIX-CLIENT:\"$DISPLAY\" & echo export IP=$(ifconfig en0 | grep inet | awk '$1=="inet" {print $2}') >> ~/.zshrc - Check if IP is available with:
echo $IP - Instead of ".zshrc" it can also be ".bashrc", depending on the shell you are using.
xhost + $IP
The container and xquarts can be started with these commands:
open -a xquartz docker-compose up &
Now everything is ready for the connection:
docker containers ls docker exec -it palmos-docker-app-1 /bin/bash
At this point, POSE should have started and you should be able to select a ROM-file, which was placed in the "palmos-docker"-folder on your Mac (the extracted tarball) and which is available in "/palmos" in the Container. It is also possible to add applications in this folder, which can then be installed in POSE.
So big thanks to Haemish Graham for letting me publish this work on this page!