The classic 90s game SkiFree running in WINE via X from your host Linux system.
To run the Dockerhub image, you will need to pass your $DISPLAY
env var, match your user ID and mount your X socket, like so:
docker run -it --rm -e DISPLAY=$DISPLAY --user `id -u` -v="/tmp/.X11-unix:/tmp/.X11-unix" alanf/skifree-wine
It runs the most officialest 32bit build from the original website.
I was so preoccupied with whether I could, that I didn't stop to think if I should...
Kidding aside, unlike the original from Windows 3.1 (that you can still run in DOSBOX online), this one scales to the biggest your screen can fit.
Here it is running in my laptop's high-DPI display at glorious 1792x1696 resolution:
and in action:
Yes, it's possible.
Escape the Yeti by traveling another 2000 m from the point at which the monster gives chase, creating a loop and starting over from the beginning.
One way to evade it is to go directly left or right in fast mode with the "F" key. He is right behind you, but cannot catch you unless you hit an obstacle.
You're on Windows?? Dude, you don't need WINE.. You don't even need Docker!
Just run the actual executable.
Okay, sure. Just remember WSL1 and WSL2 don't have GPU acceleration so don't expect great framerates.
-
You can install an X server, such as "GWSL" (free from the Windows Store.)
-
Once it's running, add this to your
~/.bashrc
to expose yourDISPLAY
:
# WSL [Windows Subsystem for Linux] customizations:
if [[ $(grep microsoft /proc/version) ]]; then
# If we are here, we are under WSL:
if [ $(grep -oE 'gcc version ([0-9]+)' /proc/version | awk '{print $3}') -gt 5 ]; then
# WSL2
[ -z $DISPLAY ] && export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0.0
else
# WSL1
[ -z $DISPLAY ] && export DISPLAY=127.0.0.1:0.0
fi
fi
- Log out and back in from a fresh terminal.
- X forwarding should work now. Go on and try
xeyes
or the full skifree command from the top of this README.
If you succeeded, good job! You now made a 32bit Windows exe run in a Linux container from inside a Linux Windows subsystem. (You crazy maniac, you!)
I was reading about X forwarding in Docker containers and wanted to put it to practice.
This exercise taught me that --user
in docker run
with your own user ID lets you tap into your active X session easily without file ownership issues or X security errors.
Enjoy! (and don't let the Yeti get ya!!)