Launch DOS Games In Ubuntu From Unity’s Dash!


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.

[Desktop Entry]
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.

man dosbox

Now, let’s see how well that worked!  Fire up the dash and type “war”.


There it is!


Now, just pull it over to your launcher, and you’re all done!  Good luck.



Dean Howell

Aside from being a huge Sega fan, Dean is an LPIC certified Linux professional with over a decade experience. In addition to spending his free time burning through the classics from Sega and evangelizing open source, he's also the editor-in-cheif of The Powerbase.

Related posts

  • Kano

    Whats the logic behind running dosbox from your home but putting the rest system wide? Any other user can not write to your home anyway. So don’t use /usr but ~/.local . Does not require sudo of course.

    • Dean Howell

      DOSBOX doesn’t run from my ~/ dir, only the game Warcraft… The likelihood of another user on the system wanting to play DOS games is limited, but you can put these things wherever you want to. :)

  • Pingback: Links 12/1/2012: Linux Mint 12 KDE is Coming, CyanogenMod Reaches 1 Million Milestone | Techrights

  • Pingback: Launch DOS Games In Ubuntu From Unity’s Dash | Linux | Syngu

  • Skitters

    I had no idea what I was doing when I did this a month ago and I followed the instructions too literally. I now have a useless launcher and I don’t know how to get rid of it or change it.
    Any help?

  • g3yjr

    Thanks for the advice. Linux lets me launch an old radio contest logging program now :) I added -c “exit” to the Exec line so that it closes the dosbox when I quit the application.