If you’re a retro gamer, you know that emulators can be a pain to deal with. The emulator is a necessary component for playing old games for old platforms, but if you are just playing one game over the course of a week or more, the process for starting the game can be tedious. This is especially true for DOSBOX. One of my favorite emulators for playing the classics, DOSBOX doesn’t come with a fancy front-end for managing a collection of games. It gives you a command-line and lets you launch games the same way you would have on a DOS computer. Now, I should note that DOSBOX has a great configuration file, and when used properly, you can accomplish some of the more redundant tasks automatically, like mounting your C: drive using a local directory full of games. But that’s not what we’re here for. We want to launch one game with a mouse, from the Dash. Let’s go!
To start, I’d like to emphasize that this is not a tutorial on how to use, or configure DOSBOX. I’ve assumed that you are already able to launch a DOSBOX game. For this tutorial, I’ll be configuring Warcraft: Orcs & Humans for launch from the Dash.
Let’s Do It!
You don’t have to have an icon, but it will certainly make things look better. If you are going to be playing Warcraft, you can use this icon that I made. You should see it over here on the right. Assuming that you have it in your home directory, do:
~$ sudo cp ~/wcoh.png /usr/share/icons/
Now, this icon is available system wide.
OK, now we will have to make the launcher. We’ll make a new file and call it warcraft.desktop. To do so, enter the following command:
~$ sudo nano /usr/share/applications/warcraft.desktop
Put the following information in the file.
Name=Warcraft Orcs & Humans
Comment=This will launch a DOS game from Unity!
Exec=dosbox -c "mount c /home/dean/Games/Roms/DOS" -c "C:" -c "cd WARCRAFT" -c "WAR.EXE"
Once you’re done editing the file, do Ctrl+o to save, then Ctrl+x to exit.
Here is a brief overview of what you just did.
Name: You can call this whatever you want. I went for Warcraft Orcs & Humans, naturally.
Comment: We’ve recorded the purpose of the launcher. It’s avoidable, but there is no reason to avoid it.
Exec: This is the command that will execute the game. Let’s take a look at it.
Icon: Be careful here. If you’ve got a custom icon, and you’ve installed it somewhere else, change the path.
DOSBOX allows you to make two types of commands; commands internal to DOSBOX, which are encapsulated in quotes, and everything else. :) When you first launch Dosbox, the first thing you need to do is mount a drive. This is usually a folder in your home directory. Loosely, what I’ve done is symlink my DOS directory to a virtual C: drive with “mount c ~/Games/Roms/DOS”. For your own purposes, replace this line with your DOS games directory.
"mount c ~/where/is/your/stuff"
The rest are just DOS command. The command switches to your C: drive with “C:”. Then, “cd WARCRAFT” to enter the games directory. If you were playing Blake Stone, then “cd BLKESTNE”. Finally, we put the executable file in quotes. “WAR.EXE”
You don’t have to stop there! Maybe you want to start the game is fullscreen, or perhaps use different video filters than the ones specified by your config file. Make sure to read the manpage to learn how.
Now, let’s see how well that worked! Fire up the dash and type “war”.
Now, just pull it over to your launcher, and you’re all done! Good luck.