DOSBox is an excellent DOS environment that you can enjoy on modern Linux systems. I was never really into DOS all that much in my early computer years. I used it but I didn’t really enjoy it. I much preferred Commodore 64 because it was far more colorful, later the Amiga, because it was far better in sound and graphics and I got my first x86 based system in the Windows 98 years where I only used DOS to do gaming. That said, I do have many happy memories of playing DOS based games like Space Quest, Police Quest, Simant and many others. Games like Descent and Doom have been ported to Linux so there is no benefit in running the DOS version.
I got the “hankering” to play some old DOS games, specifically Oregon Trail and Sim Ant for some unknown reason, perhaps it was head injury induced, I can’t say for sure. As I was playing with DOSBox, I couldn’t help but think how much I was enjoying the experience and started thinking, “Can I easily integrate these games in my openSUSE Tumbleweed, Plasma Desktop experience?”
Hard to find solid information regarding Linux so I did a bit of digging. Multiple stops at various sites with various issues told me it was time to take notes and make a little blathering about it.
The installation should be straight forward in most distributions. I can’t speak for any distributions outside of openSUSE, but I imagine it is pretty similar.
sudo zypper install dosbox
As an important note, in openSUSE Tumbleweed, the installation of DOSBox installs DOSBox Staging which, according to the project page this is an attempt to revitalize DOSBox’s development process. It’s not a rewrite, but a continuation and improvement on the existing DOSBox codebase. It looks like the last commit on DOSBox was in June of 2019.
DOSBox isn’t a large application and is ready to be use in short order. Just a quick search in your menu and you will see “DOSBox-Staging” available. When you run this, you will be presented a familiar DOS prompt from days past.
I highly recommend reading through the Intro to familiarize yourself with how to use DOSBox. If you have some familiarity with DOS from times past, this will be pretty simple. If you don’t, it’s still pretty simple, so long as you have a good grasp of file systems. The first step is to mount the location of your DOS goodies. I mounted a specific directory in my home folder with my appropriate wares.
mount C ~/System/DOS
To explain this, I am mounting as the “C Drive” the location on my home folder specified. You may be storing your DOS applications elsewhere so be conscientious of that. To navigate to the C drive is super easy
List the contents by typing “ls” or the DOS native command “dir”.
Next change the directory into the location of the game you desire to play. Example:
Finally, execute the game itself
Just like it is 1991 all over, popping in that 5¼ inch floppy into the family 286 you can play a game for the short time before you are told that it’s a school night and you can’t stay up late again because you are unbearable in the morning when you don’t get enough sleep…
I am far too lazy to do all that work just to play a few minutes of a game to get that hit of nostalgia I was craving. I decided that I wanted to auto mount a particular directory with my games on it. DOS isn’t really for productivity, it’s just a platform to launch the games of days past. Go ahead, tell me I’m wrong…
The first trick is to find where the DOSBox config file is sitting. Any site that tells you to look in the “.dosbox” folder is out of date. DOSBox-Staging keeps it in:
it is also called: dosbox-staging.conf
The beautiful thing about this default config is that it is basically good for most use cases. If you need some changes for a particular application and know your early x86 based hardware, it’s real easy to make tweaks. The portion of the config I am most excited is the “[autoexec]” section. At the very bottom of the default config is where you can automate some magic.
Although I know that there are launchers out there for such things, I wanted to understand how to actually use DOSBox properly with the config file. Thankfully the default config file is incredibly well documented, better than any sites out there I found, so I am just going to explain how I did a thing. That thing is automatically mounting the folder location for all my DOS based applications. I want to recreate the basic DOS experience that I “enjoyed” for launching particular games that were enormously fun. I don’t need to relive the DOS experience on the old hardware as much as I want to pick up and play the old games from time to time and I want to make it as painless for me as possible.
My intent here is just to automatically mount the C drive using the specified location for my DOS applications every time I start DOSbox. Within the previously mentioned dosbox-staging.conf, scroll the very bottom and you will see [autoexec] along with some commented out options.
Here I am mounting my desired drive location and also automatically selecting that drive. The fun can further be expanded from here to wherever your imagination takes you. You can add your own start screens unique to your desired DOS experience. There is nothing stopping you from creating multiple .conf files, named whatever you wish with specific hardware tweaks and automatically starting your application or game of choice.
I want to add one small note about some other bits of power you are given with DOSBox and that is the ability to invoke another .conf file for particular application. It is just as easy to copy and modify a .conf file to automatically launch a title as well. For example, assuming I wanted to just play Simant, I can take a copy of the .conf file and add this to the [autoexec] section.
To run DOSbox with this particular .conf file:
dosbox -conf ~/.config/dosbox/dosbox-simant.conf
To which, I can make a custom menu entry and play Simant like any other native game on my Linux desktop. The avenue of becoming slightly lazier in accessing your vintage titles is clear and easy to implement.
Though I am a vintage tech enthusiast, DOS era x86 machines largely don’t do a whole lot for me. I have enormous appreciation for the old machines but unless they are something unique or special visually or significant in the development of the x86 platform, I have no desire to amass a collection of things that my modern machines can do just as well. I enjoy that I am able to play DOS games or run some unique fun applications right from my openSUSE Tumbleweed Linux machine. I love that I can edit a .BAT file using my KDE Plasma native text editor, Kate, save it and just smile at the results of perfecting my configuration. It really feels like I am melding together the past with the present in the best way that suits me as possible.
I will have a follow up article to this with some other fun things I have done with DOSbox. DOS is way more fun today for me than what it was some 30 years ago and DOSBox makes it possible. I do realize that there are other DOS game launchers out there but this one is pretty fantastic, and easily able to be tailored to your unique case. I am super grateful for the years of time and care to make DOS just another extension of my Linux experience.