Playing Windows games on Fedora with Wine

Days of Wine

© Lead Image © Andrei Krauchuk,

© Lead Image © Andrei Krauchuk,

Author(s): , Author(s): , Author(s):

Although Linux has made great strides in gaming, users sometimes miss the games that are only available on Windows. Linux provides a way to solve this problem with Wine, the Windows "not an emulator."

Wine [1], which is a recursive acronym for "Wine is not an emulator," is an infrastructure of applications and libraries that allows Linux users to execute programs developed for Windows. Versions of Wine also exist for BSD, Mac OS X, and Solaris.

As its name spells out, Wine is not an emulator as such, nor is it a virtualization program; instead, it is an open source implementation of Windows APIs, a series of "libraries" that allows you to execute Windows applications in Linux in much the way Microsoft executes old applications (e.g., MS-DOS applications) in compatibility mode.

Wine is available in Fedora's official repositories and can be installed with your package manager of choice. The alternative is to compile the project from source [2] to ensure the latest version is installed with all the most recent security, performance enhancements, and other improvements, but this may be more trouble than it's worth.

Wine Installation

Wine can be installed in two ways. Wine is an obligatory package in every self-respecting distro, and Fedora is no exception. You can install it with:

$ su
# yum install wine

Or, if your user has administration privileges, use:

$ sudo yum install wine

On a clean Fedora install, this action pulls in more than 170 files. Depending on the speed of your Internet connection, you may want to fix yourself a snack while you wait.

The second way to install Wine is from the sources available online [3], but this method is tedious and complex because of the large number of dependencies, so we will not go through that process in this article.

Savoring Wine

Once Wine and all of its dependencies are installed, it is ready to use. Before we go further, we should make some remarks about the way the program works to maintain interoperability between Windows programs and your Linux system.

Wine's root directory is $HOME/.wine, which is the .wine folder in the home directory of the user. This directory is created the first time you run Wine. Wine includes two programs that let you check to see whether everything has installed correctly. In the example, you can run Windows' Notepad application by opening a terminal window and typing:

wine notepad

For the time being, ignore all the error and warning messages that Wine shows and cancel all dialog windows (for a smoother and error-free Wine execution, take a look at the "Winetricks" box).

Now that you have your first Windows program running on Linux, take a look at the directory structure of Wine (Figure 1). Go to Notepad's Menu | File | Open, open up the locations box (Look in:), and choose My Computer. You'll probably see three drives: C:, D: and Z:. Drive C: contains the "system" files that Wine requires to work. It contains the windows directory with libraries and executables, Program Files, and users.

Figure 1: Explore Wine's directory tree with Notepad.


Often, when you try to install a program, you will find that, to complete the install, you need certain add-ons for Windows, such as the Visual Basic 6 runtime or the .NET framework. These are called "dependencies" in software management jargon.

A possible solution is to hunt for the packages on the official websites and install them by hand. Good luck with that. This option is not only frustrating (because it is not always possible to find said packages or libraries easily) but also tedious, especially when you need to add several packages, which, in turn, require several more dependencies.

A much better option is to use Winetricks [4], a program that allows you easily to find and install all the dependencies that your program could need.

To install Winetricks on Fedora, first you have to install wget, a useful utility that will help you download Winetricks from the official site. Type

$ sudo yum install wget

if your user has administrator privileges, or

$ su
# yum install wget

if you don't.

Next, if you don't have one already, create a bin directory in your /home directory:

$ mkdir $HOME/bin

and change into it:

$ cd $HOME/bin

Now, download the winetricks script:

$ wget

Finally, you have to make winetricks executable:

$ chmod +x winetricks

Once you're done, when you need to use it, you can execute the script from anywhere by typing:


in a terminal.

When executed, a dialog comes up that lets you choose the libraries you want to install (Figure 2). Highlight those you need and press OK. The program will then download and install them automatically.

Figure 2: Winetricks makes solving the installation of Windows' program dependencies a piece of cake.

We recommend that you execute winetricks from a console to see what the program is doing, because its GUI does not display the progress of what it's downloading.

Drive D: is your CD/DVD reader and Z: corresponds to the Linux root folder (/); so, yes, Wine allows you to access your files on Linux outside its own directory tree.

On the Linux side, open a terminal and list the contents of .wine in your personal directory with:

ls .wine

In the output, you'll find the following folders:

  • dosdevices: Contains the mapping that Wine does of the different drives. In this case, it contains c: mapped to the drive_c directory, which is the system's drive, and z:, which is mapped to the Linux root directory (/).
  • drive_c: Contains the directories that Windows needs to be able to execute applications.

If you look inside drive_c, you will find:

  • Program Files: Where Windows programs will be installed.
  • users: Where the user profiles are kept.
  • windows: Where the system files are located.

When you install Windows programs through Wine, they will be installed in .wine/drive_c/Program Files. If you need any additional libraries to execute the program, you need to copy them to .wine/drive_c/windows/system32.

Home Brewing

Wine's parameters are accessible by running the winecfg program (Figure 3), which lets you configure execution options – including the system being emulated (i.e., Windows 7, Windows XP, Windows 98, etc.), sound options, system libraries, storage drives, graphics options, and others – in a convenient and helpful GUI.

Figure 3: Winecfg allows you to configure everything that has to do with your Wine installation.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Tutorials – Wine

    Convert your home/office/friends to be completely Microsoft-free with our tips and tricks.

  • Practical Wine

    More and more Windows applications run on Linux thanks to Wine. If you spend a little time on configuration and troubleshooting, you won’t be stuck in Windows – even with applications that no one dreamed would run on Linux.

  • Wine

    Users who move from Windows to Linux often miss some of their favorite programs and games. Wouldn't it be practical to run Windows applications on the free Linux operating system? Time for a little taste of Wine.

  • Wine

    The Wine compatibility layer lets Linux users run Windows programs. Unfortunately, configuring Wine is anything but trivial, and it helps if you enjoy experimenting.

  • Windows apps with Wine

    If you need to make a Windows application run on Linux, there is no better way than Wine. We investigated the free and commercial Wine variants to see how they bear up under real-life conditions.

comments powered by Disqus

Direct Download

Read full article as PDF:

Price $2.95