Play Windows Games

Play Windows Games

Those Windows games don't have to be trapped in that partition you rarely boot into. Instead, you can use Wine or Cedega to play them.

Wine (, the open source Windows compatibility layer [Hack #87], is well known for its ability to run many popular Windows applications, and even certain Windows components such as Internet Explorer. Wine can also run some popular Windows games, though gaming is not its primary focus. Still, if a game runs successfully in Wine, then Wine is probably the best way to play it. It is usually a fairly straightforward matter to install and play games in Wine, not to mention the fact that Wine itself is free and open source software.

Still, there are other game-playing solutions for Linux that may often produce better results. That is certainly the case when it comes to classic, DOS-based games. For these, DOSBox ( is your best bet. DOSBox is a free and open source x86 and DOS emulator that runs on multiple platforms (including modern versions of Windows and Mac OS X, as well as Linux). It is especially good with older games.

Run Blasts from the Past

DOSBox is included in Ubuntu's universe repository [Hack #60], and it is generally up-to-date. So you can simply install it by running:

$ sudo apt-get install dosbox

or using Synaptic [Hack #55] or Adept [Hack #56]. In either case, the SDL multimedia library dependencies will also be installed. After you've installed DOSBox, you'll need to create a new directory in your home directory and name it something like dosgames. This is, of course, where you'll install those DOS classics you remember so fondly. Let's download and install a game to use with DOSBox; you'll find almost all the classic DOS games at the Abandonia site (

I chose a true all-time classic, the original Tetris (, and made a directory for it (dosgames/Tetris). Then I unzipped the Tetris download into the dosgames/Tetris directory. To launch DOSBox, you just type dosbox in Terminal.

Doing so brings up the DOSBox shell (shown in Figure), where you can enter various DOS commands and launch your games. The DOSBox shell opens in the Z directory by default, so you will need to mount the C directory, which contains your games. You can do so within the DOSBox shell by typing:

Z:> mount 

where username is your username and dosgames is whatever you named the directory that contains your DOSBox games. After you've mounted the C directory, you can switch to it simply by typing c: within the shell.

The DOSBox shell

Now that you're in the C directory, type dir to have a look at its contents. (See the DOSBox Wiki at for a DOS command reference and other useful information.) If you've installed Tetris, you should see a line like this:

TETRIS   <DIR>   15-03-2006   14:14

which simply tells you that TETRIS is a directory, and gives you the time and date of its installation. Inside the TETRIS directory (change to it by typing cd teTRis, and then look inside with dir), you'll see one file: (DOS executable files have one of three extensions.exe, .com, or .bat.) You can launch the game by typing (You can also launch the game by typing TEtrIS.COMdon't worry about case sensitivity.) Figure shows the game in action.

Playing the original Tetris, with DOSBox

There are a few basic commands you can access if you need:

  • Ctrl-F7 decreases frameskip.

  • Ctrl-F8 increases frameskip.

  • Ctrl-F11 slows down the game.

  • Ctrl-F12 speeds up the game.

When you've finished your game, type z: at the prompt and press Enter. This takes you back to the Z:> prompt, where you can type exit to quit the DOSBox shell.

You're not limited to antique classics like Tetris when you use DOSBox; many more graphically advanced games are available as well. Abandonia, in addition to its very wide selection of games, is also valuable for its compatibility ratings; you can see at a glance whether an older game is compatible with DOSBox (most are). And many collections of DOS games are available on CD-ROM, including classic role-playing games such as Wizardry and Might and Magic, as well as classic text adventures from Infocom. Some of these collections are easy to find in the $9.99 bin at your local computer store. Others are a bit harder to find, so you might have to check eBay.

Run Current Windows Games with Cedega

Cedega ( is a commercial version of Winecommercial to a fault, some would say. Cedega, formerly known as WineX, is basically a fork of Wine that has gone proprietary. This has generated some resistance among free software fans, and you won't find Cedega in the Ubuntu repositories. But if you're a gamer, you'll want Cedega anyway; it's generally regarded as the best way to run recent Windows titles on Linux.

Cedega costs $5 per month, and you have to pay the first three months up front. However, there is a fully functional, two-week trial version available. I recommend you start with that; if you like it, you can convert to the paid version from the trial.

You can download the Cedega Time Demo from You'll find the download link near the bottom of the page, and you'll find system requirements and installation information at Pay particular attention to the video-card requirements: Cedega won't be worth your subscription cost if your system isn't up to handling current games. NVIDIA GeForce or ATI Radeon class cards are pretty much the minimum requirement; pixel shaders are only available on NVIDIA FX class cards and above. ATI Radeon 8500 or better cards will also work, but only with proprietary ATI drivers. Intel and other cards may be able to drive some games, but probably not most.

To install the Cedega Time Demo, run the installation script with this command:

$ sh 

Note that the preceding command will install the Time Demo in your user directory. If you'd prefer a system-wide installation, then run the preceding command as root.

The installer will check for updates and then ask whether you want to install the Microsoft Core Fonts and the MozControl package. You must agree to the licenses for each before they are downloaded as part of the install.

The TransGaming people will email you a registration key, which you'll need to enter during the process of installing Cedega. Figure shows the Cedega registration process.

The Cedega demo must be registered during installation

Finally, before you play your first game with Cedega, a wizard will walk you through tests of various facets of your system. If your computer can't pass the OpenGL Direct Rendering and 3D Acceleration tests, in particular, Cedega is not going to run many games.

After installation, you can launch the Cedega Time Demo by entering:

$ ~/cedega_timedemo

in a Terminal. This brings up Cedega's graphical interface (see Figure).

The Cedega interface

In Cedega, almost everything can be done via the GUI. There are command-line options too, though. You can read about these options and other Cedega usage tips on the Cedega How-To Guide page at Note that the Cedega Time Demo is actually the same as the full subscription version, currently 5.1.

To install a game with Cedega, just click the Install button and then browse to and run the installer. You can download games from a wide variety of sources (e.g.,, and you can even mix and match the original Windows .pak files from CDs with open source game binaries for games like Quake I, II, or III. You can also install demos to try a game before installing the full version (see Figure), but note that there can often be significant differences between the demo and the full game; both may not run. TransGaming has an extensive games database ( you can consult.

Installing the Quake III demo

As noted earlier, you'll want the best graphics setup possible to take maximum advantage of Cedega and today's Windows titles. But Cedega (and Wine as well) can run some games even on underpowered machinesa title such as Delta Force 2 being a case in point (see Figure).

Running Delta Force 2

Cedega, in spite of its licensing and cost issues, is regarded by many as the best way to run current Windows games on Linux. For hardcore gamers, that alone is enough to recommend it. Just be sure your system is suitably equipped, and also make sure you have the time and inclination to tweak your system to get the most out of Cedega, and today's games. Sometimes a game will run "out of the box," but sometimes it won't. For many gamers, getting such games to work is part of the fun.

Run Google Earth with Wine

Modern games aren't the only visually advanced Windows applications that can be challenging to run on Linux. Because it relies on DirectX and OpenGL, a sophisticated application like Google Earth poses similar issues, and there are similar rewards for those who can get it to run.

A HOWTO for Gentoo users for installing Google Earth with Wine was published at, and I was able to adapt these instructions for an Ubuntu PC. Your mileage may vary: chances are some additional tweaking will be required, depending on your computer's exact configuration. But you can use the following instructions as a starting point, and, if you're lucky, they'll be all that is needed. First, of course, you must install Wine [Hack #87].

Next, you need to install the Microsoft DCOM98 (Distributed Component Object Model for Windows 98). First, run winecfg and set the Windows version to Windows 98. Then, you can download DCOM98 from here: http:// DCOM98.EXE (or just search for the link on Google; it's probably faster!). Now, install DCOM98 with a WINEDLLOVERRIDE, specifically:


After you have DCOM98 installed, download the psapi.dll from and place the DLL in your ~/.wine/drive_c/windows/system32 directory.

Downloading these DLLs from untrusted sources can be quite dangerous, since you have no way of knowing that they have not been compromised (for example, they could be harboring a Trojan horse). The safest option is to copy them over from a working Windows system that has recently been checked for spyware, viruses, and other malware.

Next, download Google Earth from Before you do so, though, run winecfg again and set the Windows version to Windows XP. Also, before you install Google Earth, make sure you download the usp10.dll (Google for the download location); place this in the ~/.wine/drive_c/windows/system32 directory as well.

Now, install Google Earth like so:

$ WINEDLLOVERRIDES="ole32,oleaut32,rpcrt4=n" wine GoogleEarth.exe

After you've managed to install Google Earth, you reach the moment of truth: it's time to run it. Here's the command I used:

$ WINEDLLOVERRIDES="ole32,usp10,msvcrt=n" \\
                 wine "c:\\Program Files\\Google\\Google Earth\\GoogleEarth.exe"

This should work (see Figure). However, it might not work on your system, and therein lies the challenge. (If you do run into trouble getting it to work, be sure to check the HOWTO mentioned earlier in this section.) Getting Google Earth to run on Ubuntu or any Linux system is a worthy hack, and tools like Wine (along with DOSBox and Cedega, for vintage and state-of-the-art games) make it possible.

Thomas Pletcher

Google Earth launching via Wine

 Python   SQL   Java   php   Perl 
 game development   web development   internet   *nix   graphics   hardware 
 telecommunications   C++ 
 Flash   Active Directory   Windows