Playing Windows games on Fedora with Wine
Days of Wine
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 , 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  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 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 , 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.
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:
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: contains the "system" files that Wine requires to work. It contains the
windows directory with libraries and executables,
Program Files, and
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 , 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
$ mkdir $HOME/bin
and change into it:
$ cd $HOME/bin
Now, download the winetricks script:
$ wget http://winetricks.org/winetricks
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.
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.
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:
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_cdirectory, 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'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.
Buy this article as PDF
Innovative system adds a hard drive and Ubuntu Core to the RPi for an IoT hub.
Linux is two weeks younger than we thought!
The Apache Software Foundation considers retiring OpenOffice
Adobe won’t kill the plugin in 2017
Linux Foundation's big event celebrates the 25th anniversary of Linux
Linux has evolved from “won’t be a professional” project to one of the most professional software projects in the history of computers.
Competitors get in the game with RHEL without Red Hat
Security researchers have already notified Microsoft; some fixes are available
The company is collaborating with Google and Intel to use Kubernetes as an engine for Fuel