Ditch the headache. Play your favorite DOS games on the Steam Deck with DOSBox!

Ditch the headache. Play your favorite DOS games on the Steam Deck with DOSBox!
Photo by Petar Vukobrat / Unsplash

Are you a sucker for classic 90s games but struggling to get them to work on your Steam Deck? This guide will show you how to get them up and running in just a few minutes.

First, if you own a DOS game through Steam, there are a few options that will help you get running really quick. Go into desktop mode. Depending on where you get your games from, we'll need to install them.

For the sake of this tutorial we will be using SimCity 2000, Aladdin, and Earthworm Jim as examples. If you bought the game from GOG, you'll want the Heroic Game Launcher in order to install them. It's the simplest method. Launch the Discovery Store and then download the games. Many games will launch from here without issue, but if you want to be able to play them from game mode without having to open Heroic first... or if your game doesn't list native Linux support but is running a version of DOSbox that doesn't work on the Steam Deck, here's a workaround.

Install whichever games you want to play in DOSBox. Here, it's SimCity 2000. By default, games will install to ~/Games/Heroic/[and then the name of the game]/.

Next, we'll need to install DOSBox, the MS-DOS emulator we'll be using, and Flatseal, which will give DOSBox the necessary permissions to run the game. You can install both applications with a terminal:

flatpak install flathub com.dosbox.DOSBox

flatpak install flathub com.github.tchx84.Flatseal

Alternatively you can search for these apps with Discover and install that way. Launch Flatseal, and select DOSBox on the left pane. Scroll down on the right pane until you come to "Filesystem." Under "Other files," click the folder icon to add a new folder. Set the file path to wherever your DOSBox games are located. In my case it's /home/deck/Games/. Alternatively, you can simply give it "Home" permissions. If your games are installed to your MicroSD card, you would add /run/media as well. We need to do this is so DOSBox has access to this path; otherwise DOSBox wouldn't have access to this directory.

Our next step is to head to our Steam Library. Click the + ADD A GAME button in the bottom left. Select "Add a non-steam game" from the menu. Hit the "Browse..." button and head the directory we installed our game in. If you don't see the game's binary, make sure you change "File type" to "All Files"

For SimCity, we're going to add the sc2000.bat executable. Add it to your library, then find it. Right click on it and select "Properties." Now, in the "target" field, add flatpak run com.dosbox.DOSBox at the beginning, making sure to leave the path that was originally there intact.

If you have a DOSBox configuration file, you can go ahead and add that here too, taking care to prefix the config file with the -conf flag.

While we're in here, we can give the library entry for this game a better name.

Okay. Now we should be ready to rock and roll. Let's close this window and try launching the game.

Boom. Look at that! It's working!

Now, this is not a surefire method, unfortunately. DOSbox can be fickle, sometimes. And because of that, we're going to have to explore other options.

Now, there is a more involve way that requires making bash scripts. This can be useful if you find a rare example of the previous method not working. Earthworm Jim posed an issue for me.

So let's make a bash script. There's no particular place where this needs to go; you can put it on your desktop or somewhere in the /home folder. In your file manager, right-click and create a new text file. Name the script to whatever you want, but I like to end my scripts with the .sh file extension. In my case I named it earthworm_jim.sh. Open the newly created script with a text editor (KDE Plasma has KWrite installed by default, but you can use other text editors if you wish after installing them), then add these lines:

cd "/home/deck/Games/Heroic/Earthworm Jim/data/"
flatpak run com.dosbox.DOSBox "/home/deck/Games/Heroic/Earthworm Jim/data/EWJ1.EXE"

Change the file path to where the EXE or .bat is located for your game. Save the file, then mark it as executable by right-clicking the file, going to Properties -> Permissions -> Checking the box for "is executable." Now try executing the script and see if the game runs.

I found that if I modified DOSBox's configuration file (in /home/deck/.var/app/com.dosbox.DOSBox/.dosbox/dosbox-0.74-3.conf

Certain titles from GOG will have actual DOSBox configuration files written for them. Such is the case with Disney's Aladdin. If you browse the files, you'll see "dosbox_aladdin.conf". You can use this file which should be optimized for this game by GOG. Let's create a new shell script. Right click -> Create New -> Text File. Give it a name ending in .sh. In this case, we're gonna say aladdin.sh and then open the file in a text editor.

Again, let's input the following:

flatpak run com.dosbox.DOSBox -conf "/home/deck/Games/Heroic/Disney's Aladdin/dosbox_aladdin.conf" "/home/deck/Games/Heroic/Disney's Aladdin/data/ALADDIN.EXE"

And we can switch back to our file manager to grab the correct values here. Right click on dosbox_aladdin.sh and then select "copy location". Go back to your text editor and paste it in there, taking care to surround the path name with quotation marks. Same with the executable. Navigate to the data directory and then right click ALADDIN.EXE and select "copy location" then paste it into another set of quotation marks.

Now save and close your text editor, right click and click properties, go to the permissions tab and check the "Is Executable" box.

Okay, now click on the script and if you did it correctly, the game should boot into full screen mode.

If you're having trouble with sound, I found that adjusting the SBLASTER IRQ from 7 to 5 made the sound work in SimCity, but leaving it at 7 worked for most of the games I tried.

You also may want to add the script as a non-Steam game so you can launch the game in Gaming Mode.

If you're wondering why I didn't recommend Luxtorpeda or BoxTron in this guide? It's because they didn't seem to work reliably for me. BoxTron didn't work at all and Luxtorpeda only successfully launched ONE of the five DOS games I tried with it.

I think BoxTron would be fantastic here, but as it stands the only versions available--the manual install and the flatpak--are incompatible with the Steam Deck for various reasons. Missing dependencies and the like. So we've gotta do it the manual way. And that's unfortunate.

If you want to watch a video version of this tutorial, check this out: