A Retro Gaming Box

Despite a thorough dislike of Microsoft, every so often I get the urge to play around in Windows (or even DOS). Besides the obvious lure of gaming, I suspect nostalgia more then anything causes the itch. So in a vain attempt at recapturing lost youth, I spend a few days fleshing out FreeDOS, ReactOS, maybe even bona fide Windows, doing a valiant waste trek across abandoned and dubious corners of the internet, in search of code rotten commercial spamware, before the Steam is finally replaced with abject dejection. I don't know why I keep repeating the same mistakes... In any event, I had such a moment recently. Finally, it dawned on me that simply converting a Linux distro to a bastardized Windows/DOS look-a-like, is a much more pleasant experience. In the off chance that people besides me may have the same itch, I decided to write up a small guide.

Windows theming - pragmatic approach

If you're a KDE fan, you'll find many Windows-like Plasma themes in the KDE store, such as Reactionary (Windows 9x), Expose (Windows XP), Win7OS (Windows 7) and We10XOS-dark, We10XOS-light (Windows 10). (and if you're in a retro UNIX mood you can check out Irixium or Commonality which both mimic the CDE desktop) The list is impressive, but in my experience tweaking KDE to look like Windows is an exercise in frustration. Be prepared for a number of reboots and manual file deletions. (Yes, I'm sure your distro handle it with grace, it must be me)

For Xfce though, there is a very cool GitHub project called Chicago95, which goes out of its way to transform this desktop into a Windows 95 look-a-like. The python installer is not 100% automatic, and depending on what version of Xfce you are using, you might need to shuffle the panels and launchers around a bit. (right click the top panel, Panel > Panel Preferences > uncheck Lock Panel, you can now drag it around) The sound theme may not work, but you can always add the Chicago95 startup melody by opening up the Settings Manager > Session and Startup > Application Autostart > Add > Command: play ~/.local/share/sound/Chicago95/stereo/desktop-login.wav

Xfce lacks a few classic Windowsy applications, but we can nick gnome-games, evince (PDF reader), epiphany (Web browser) and gnome-calculator from the GNOME desktop. One of the true joys of setting up a Windows look-a-like on Linux, is to use xscreensaver, with the BSOD screensaver, to play Windows blue screens of death whenever your computer is idle. (however, it's getting increasingly difficult to do this, in the brave new Wayland world of ours)

PS: Be sure to check out Chicago95 Plus! (ei. the Plus directory in the Chicago95 source tree). It includes a theme converter that can take a Windows 95, 98, ME or XP theme and apply it to Chicago95 - cool stuff!

Windows theming - minimalist approach

Generally, I would recommend the KDE/Xfce approach, it's a quick set up and you end up with well supported software. Personally though, I'm a minimalist, and I find it oddly satisfying to run a Microsoft look-a-like, that requires one hundredth of the resources that Windows 11 require.* First of, we can install icewm. Secondly, we can download the SE98 icon set. (copy the SE98 directory to ~/.icons)

Sidenote: The RAM statistics in the provided screenshots hide somewhat how light IceWM really is. Linux itself requires about 300 Mb of RAM plus another 50 for X11. (rather bloated, speaking as an OpenBSD/Plan 9 user) So IceWM, with a couple of applications running, is only using about 50 Mb of RAM. More or less 1% of what a Windows desktop would use I recon.

You might feel a bit underwhelmed when you first boot up the Ice Window Manager, but don't worry, we can improve on this foundation! (PS: For high resolution displays, you may need to manually increase the font and icon sizes, it's possible but.., fiddly) First, go to box-look.org and download the Windows 2000 theme for IceWM, install it like so:

$ mkdir ~/.config/icewm
$ cd ~/.config/icewm
$ cp -r /usr/share/icewm/* .    # this could be somewhere else
$ cd themes
$ tar xf ~/Downloads/Win2k.tar.gz
            

You can now restart IceWM and select the theme from the start menu > Settings > Themes > Win2k. We can also make a few cosmetic alterations and add some apps to the start menu by editing a few files:

$ cd ~/.config/icewm
$ cat preferences
TaskBarShowWindowListMenu=0
TaskBarShowWorkspaces=0
TaskBarShowCollapseButton=0
TimeFormat="%-I:%M %p"
IconPath="$HOME/.icons:/usr/local/share/icons:\
/usr/local/share/pixmaps:/usr/share/icons:/usr/share/pixmaps:"
# or "*:-Chicago95" to use Chicago95 icons
IconThemes="*:-SE98"

$ cat toolbar
prog "Web browser" web-browser netsurf # or wine iexplore
prog "Email" email claws-mail

$ chmod +x startup    # make it executable
$ cat startup
#!/bin/sh
xscreensaver -nosplash &
play ~/.config/icewm/windows_startup.mp3 & # get from youtube or something
xrdb -merge ~/.Xresources
xrdb -merge /usr/share/X11/app-defaults/XCalc-color # could be elsewhere


$ cat menu
prog "Terminal" xterm xterm
menu Accessories folder {
    prog "Calculator" accessories-calculator xcalc
    prog "File manager" xfe xfe # or rox
    prog "Screensaver" xscreensaver xscreensaver-settings
    prog "Notepad" xfw xfw # or notepad (wine)
}
menu Office folder {
    prog "Abiword" abiword abiword
    prog "Gnumeric" gnumeric gnumeric
    prog "PDF reader" evince evince # or xpdf
}
menu Games folder {
    prog "Freecell" applications-games freecell
    prog "Solitaire" applications-games solitaire
    prog "Spider" applications-games spider
    prog "Minesweeper" applications-games xmine # or winemine (wine)
    prog "Mahjongg" applications-games xmahjongg --layout schoon \
    --tileset real --background green # this needs to be one line!
}
menu Internet folder {
    prog "Web browser" netsurf netsurf
    prog "Chrome" chromium chromium
    prog "Email" claws-mail claws-mail
    prog "Chat" hexchat hexchat
}
menu Multimedia folder {
    prog "Media player" vlc vlc
    prog "Music player" audacious audacious
    prog "Volume" volume xterm -e alsamixer
}
menu Graphics folder {
    prog "Image editor" gimp gimp
    prog "Image viewer" xfi xfi
    prog "Paint" xpaint xpaint # or mtpaint
}

$ cat ~/.Xresources
*background: grey
*foreground: black

XTerm*background: black
XTerm*foreground: grey
XTerm*scrollBar: false
! or faceName:Less Perfect DOS VGA Regular: to use Chicago95 fonts
XTerm*faceName:Monospace:pixelsize=12
XTerm*utf8:true
            

Of course, this is just a suggestion. The application choices in particular may vary greatly depending on needs and tastes. Generally, I've tried to select apps that are as minimal as possible, while still being functional and having a Windows like GUI. xfe, xfw and xfi might be unfamiliar to you, they are all included in the xfe (file manager) package. freecell, solitaire and spider are from the ace package. Other choices, like xpaint, xcalc and xmahjongg also push very hard on the minimalistic side. (the xmahjongg line is spilt in two for better readability, but in actuallity it needs to be a single long line to work correctly) Such basic X11 applications often look down right horrendous by default, with a jarring black and white interface. In many cases though you can dress the applications up a bit, as we have tried to do in this example. (to apply changes in ~/.Xresources, run xrdb -merge ~/.Xresources) Of course, we don't have to be this ascetic, besides Xfce, the LXDE/LXQt provide many user friendly GUI apps we can choose from.

Some application choices are easier then others. There aren't really any light PDF GUI programs, xpdf used to be a fine choice, but since they've moved over to Qt, evince is actually lighter. vlc*, gimp, abiword and gnumeric are other examples of relatively heavy programs that lack lightweight GUI equivalents. (you can go lighter, but not with a GUI) Choice of web browser is perhaps the most difficult of all. I've gone for netsurf because it looks somewhat like an old Internet Explorer, while being fairly light (especially impressive since it isn't just another Webkit frontend). Can it render websites though? What!? Of course not, neither can Firefox!

CDE theming

Microsoft wasn't the only company to make graphical desktops in the 90's. HP, IBM, Sun and USL banded together to make the CDE (Common Desktop Environment) in 1993. (Steve Jobs was toying with this too, feel free to fire up WindowMaker, if you're in a retro Apple mood) It was the standard UNIX desktop on commercial systems like AIX, HP-UX, IRIX, Solaris etc until around 2000. In recent years CDE has been released as free software, and can be compiled on modern Linux/BSD/illumos.

In practice though, many of the CDE features are broken and/or outdated. An alternative approach is to install NsCDE (Not so Common Desktop Environment), it's essentially an FVWM hack which transforms this window-manager (and the GTK/Qt toolkits) to look like CDE. You'll likely want to install either Xfce or Mate as well, to provide the NsCDE desktop with a collection of useful apps. (you'll need a few dependencies, so read the INSTALL file before you compile it)

PS: The NsCDE desktop is intentionally quite pervasive. It works hard to make all your GTK and Qt apps look like CDE. This can be annoying if you habitually switch between desktops. You can use lxappearance and qt5ct to manually change back themes.

DOS theming

If you've installed Chicago95, you'll notice that the shell prompt mimics MS-DOS. We can easily make such a DOS look-a-like, and add a few "DOS" apps to our shells manually, by adding this segment to ~/.bashrc:

alias win=startx
alias dos=dosbox
alias nc=mc               # Norton Commander
alias wp=wordgrinder      # Word Perfect
alias lotus=sc
alias outlook=calcurse    # Outlook for DOS ;)
alias edlin=ed

function msdos_pwd
{
    local dir="`pwd`"
    echo $dir | tr '/' '\\'
}
export PS1='C:`msdos_pwd`> '

if [ ! -z "$DISPLAY" ]; then
    echo
    echo
    echo "Microsoft(R) Windows 95"
    echo "    (C)Copyright Microsoft Corp 1981-1996."
    echo
fi
            

This will give you the Windows commercial in X11, but not in the TTY. Note that this file isn't read on a TTY login by default, but we can easily configure bash to do so by adding a source statement in ~/.bash_profile. (for other shells these files may be different) We can further mimic a DOS startup sequence by making linux boot up in text mode and set a DOS greeting. (Eg. setting GRUB_TERMINAL_INPUT and OUTPUT to console in /etc/default/grub and running update-grub, then systemctl set-default multi-user.target. - Note that these examples are system dependent, don't just copy paste them!) Often, a Linux distro will use the DR-DOS fonts on the TTY by default. Normally, I would prefer Terminus fonts, but for the purpose of emulating DOS, this works well.

$ cat ~/.bash_profile  # read bashrc in TTY's
. $HOME/.bashrc

$ cat /etc/issue       # text before login
Starting MS-DOS...

HIMEM is testing extended memory...done.

$ cat /etc/motd        # text after login

Type ``dos'' to avoid Non-fatal errors,
type ``win'' to launch Windows 95 (C)
            

Of course, our "DOS" (and for that matter, "Windows") setup is purely cosmetic, which frankly, is a major selling point. Despite appearances, all the UNIX power is right at your fingertips. By the way, the "Non-fatal" error line is yet another humorous DR-DOS reference. To run a compatible DOS (ei. dosbox) in the TTY, you need to install xserver-xorg-video-fbdev and gpm (these names can differ between distros), and you need to set some specific values in ~/.dosbox/dosbox-0.74.3.conf:

fullscreen=true
fulldouble=false
fullresolution=1400x900
windowresolution=1400x900
output=overlay
usescancodes=false
keyboardlayout=us
aspect=false
scaler=none
            

You cannot use any graphical filters or any output besides overlay, nor usescancodes in the TTY. The screen resolution should match your maximum screen resolution, but you can try to lower this to center the image on a widescreen (the above instructions worked well on a 1600x900 screen for instance). Of course, we can just launch an X11 instance of DosBox from the TTY. Personally, I set the TTY friendly values in my default DosBox conf, but I have a more liberal X11 setup in ~/games/dos/WINDOWS, where I keep my Windows 3.1 installation with retrofitted modern audio and video drivers. I can launch it from the TTY with win 3.1 by replacing the win alias above with a short script:

#!/bin/sh
# win - desktop launch script
# usage: win [desktop]
# bugs:  assumes a very specific ~/.xinitrc

# error sound from Chicago95
err_snd=$HOME/.local/share/sounds/Chicago95/stereo/suspend-error.wav

if [ $# = 0 ]; then
    startx
else
    case $1 in
    11) if [ -e $err_snd ]; then
            play $err_snd 2>/dev/null &
        fi
        cat << 'eof' 1>&2
:(
    Your device ran into a problem and needs to die. We're
    just collecting your info. We'll die for you!

    If you call a trusted person, give them this info:
    Stop code: UNSUPPORTED LUDDITE
eof
        exit 11 ;;
    *)  desktop=$1 startx
    esac
fi
            

And we have to modify ~/.xinitrc a bit too:

#!/bin/sh

# select desktop
desktop=${desktop:-xfce}
case $desktop in
    (xfce|9*) desktop=startxfce4 ;;
    3*) desktop="dosbox -conf $HOME/games/dos/WINDOWS/dosbox.conf" ;;
    ([Xx][Pp]|7|8*|1*) desktop=startplasma-x11 ;;
    ([Vv]ista|[Mm][Ee])
        desktop="/usr/libexec/xscreensaver/bsod -root --only windows" ;;
    2*) desktop="icewm-session" ;;
    (*[IiUu][Xx]|[Ss][Oo][Ll]*|*[Cc][Dd][Ee]) desktop=nscde ;;
esac

# merge X defaults and start desktop
xrdb -merge $HOME/.Xresources
exec $desktop
            

With such a setup, win launches the Xfce Chicago95 desktop by default, but you can also launch the IceWM with win 2000, KDE with win 7 (actually, you probably need more complicated startup instructions for KDE, but I'll leave that as an exercise for the reader), Windows 3.1 in DosBox with win 3.1, NsCDE with win irix, watch a blue screen of death with win me or get a ;) nearly authentic error message with win 11.

What about... gaming?

Oh, right! This blog post was about gaming, wasn't it! Well... I'd say that Linux is excellent for retro gaming, decent for modern gaming. I have a Steam account lying around with a handful of games that I never use, testing the Windows games with Proton (right click the game, and click > Properties > Compatibility > check Force to use... compatibility tool), was initially disappointing. Only two out of the ten games I tested worked. Of course, this was a modest test, and further investigation revealed that my hardware was the main culprit. Eight out of ten worked when I retested them on a more beefy Linux PC. Nevertheless, don't nuke your Windows gaming box, and expect Proton to magically work with everything. Go to protondb.com and make sure that the games you want have at least a GOLD rating.

Sidenote: Hardware issues on Linux is rare if you use commodity gear that is a few years old, but if you use the latest and greatest super high res gamer box, expect trouble!

Having that said, for retro gaming, Linux is rock solid. DosBox can play any PC game from the 80's and early 90's, RetroArch/Mednafen* (or other emulators) can play any old Nintendo/SEGA/GameBoy/PlayStation game, and ScummVM can play pretty much any of the classic adventure games from LucasArts or Sierra. Finally, in my experience, most of the old Windows games that I've bought on gog.com will work fine in Wine. Seventeen out of twenty that I tried on my old rust bucket worked like a charm. (again though, don't expect every game to work - check the AppDB before you buy it!)

Choice of Operating System

So what distro should I use for my gaming box? I don't know, does it matter? Just pick one of the major ones and roll with it.

What about BSD or illumos, can they work as a retro gaming box? Hm.., yes and no. If you are interested in maximum compatibility with commercial games (and commercial software), go with Linux. On the other hand, if you are quite content with dosbox, scummvm and the odd wine game, then sure, FreeBSD and NetBSD should have you covered. Wine setup in FreeBSD has changed a bit in recent years, and I'm unsure what will happen when they drop i386 in future releases. The handbook says that you should install a 32-bit system to use 32-bit wine, but it is possible (currently) to install 32-bit wine and Steam on a 64-bit system. On NetBSD though you need to install a 32-bit system to install 32-bit wine. (of course, you can virtualize a 32-bit system - the NetBSD hypervisor only works on amd64, or use a 32-bit chroot) The process is not quite as smooth as in Linux, but it does work. I would not go for OpenBSD or illumos*, not unless dosbox and nethack is all you need ;) (although for pure retro/opensource gaming, OpenBSD isn't all that bad)

PS: DosBox often have poor performance out of the box in non-Linux systems. This is largely because these operating systems do not support the dynamic core feature. Setting core=simple and cycles=4000 in your ~/.dosbox configuration file will usually provide decent performance. For big games, such as Master of Orion 2, you may need to set cycles=20000. For such games, I often write a specific dosbox.conf file in the game directory and launch it with dosbox -conf dosbox.conf.

PPS: Actually, you need to nerf modify NetBSD a bit to run DosBox/Wine. Add the following to /etc/sysctl.conf and reboot:

security.pax.aslr.enabled=0
security.pax.mprotect.enabled=0
machdep.user_ldt=1
vm.user_va0_disable=0
            

SerenityOS - an honerable mention

Let's be clear: SerenityOS is not the best OS for a gaming box.* But if you are more interested in programming and operating systems, then you are in gaming, and if you want a wonderful blend of retro Windows aesthetics and UNIX powertools, a super simple yet functional system. Well.., then check out this project!