Install and configure wine to Play latest windows games in Linux

In this post i will show you how to install latest windows applications and games using wine in Linux. When you install wine the first time, wine will work but not all windows application and games will  work properly because most of them need a special configuration, some installed dlls and libraries.

There are severals opensource software based on wine like for example PlayOnLinux, a great software that can install and use windows games and applications.


About wine : “Wine enables Linux, Mac, FreeBSD, and Solaris users to run Windows applications without a copy of Microsoft Windows. Wine is free software under constant development. Other platforms may benefit as well.”





Befor to start :

{module post forum}

  •  Installation

Before to start we need First to remove the installed wine using the command.

sudo apt-get autoremove wine –purge

Then remove .wine directory

cd /home/zinovsky
sudo rm -rf .wine

Now we will add wine repository to install the latest stable release of wine:

For Ubuntu and LinuxMint, you can add wine repository to install the latest stable release of wine:

sudo add-apt-repository ppa:ubuntu-wine/ppa
sudo apt-get update && sudo apt-get install wine

– For Fedora 12/13/14 enable rpm fusion repository by installing this : RPM Fusion free for Fedora 12, 13 and 14

– For Centos/RHEL add this repository :RPM Fusion free for RHEL5 or compatible like CentOS

-For other Linux distribution , go to download link and choose the repository for your current distribution (Opensuse, Mandriva, Slackware, Debian, FreeBSD, PCBSD..) then install the latest version of  wine.

Now wine is installed and ready to go. But with the actual configuration you will not be able to install some softwares like photoshop or games because mostly these need  special configuration of wine and some necessery DLLs and libraries to work properly.

  •  Configuration

After that latest version of wine is installed, we need to run winecfg, this will create the .wine directory in our home directory.

Open terminal and run :


After the .wine directory is created, we can start installing some necessery DLL and Libraries to make wine fully functional. To do that we will install first winetricks, a script that will help us install all the needed DLLs and libraries the easy way:

Open terminal and past the following commands :

cd /home/zinovsky/.wine

Now make winetricks executable :

sudo chmod +x ./winetricks

Now we will install the needed dlls and libraries

Note that you can add or remove libraries depending of your system.

./winetricks d3dx9 droid winxp sound=alsa volnum vcrun2008 dotnet20 ie6 corefonts

d3dx9 : This will installlibraries directx

droid : This will install droid fonts

If you have an Nvidia graphic card you need to install physx Technology.

./winetricks physx

Some configuration can be done also from “winecfg” Like to configure system to set winever to XP : winxp, or set sound driver to use alsa sound=alsa.

Now you have wine installed and configured to install latest windows applications.

Now if you want to play latest windows games you will need to make some more configurations in the windows registry.

Open terminal and type :

wine regedit

You will get this screen:

Now open new strings and enter this configuration :

“VideoDescription”=”NVIDIA GeForce 8400 GS”   (Change this to your current Graphics card setting)
“VideoMemorySize”=”500″   (Use your current video memory size)

For ATI GPU use : “VideoDriver”=”ati2dvag.dll” , for Video discription and video memory use  your current video card settings.


The configuration above is common for most of games, if this doesn`t work for you please go to :


2- On the left menu click on Browse Apps

3- Use the filter and look for the game you want to install.

3- filter

4- Change wine configuration to match with currect game.

For example to install and play Call of Duty: Black Ops

I had to set “UseGLSL”=”disabled” so the configuration become :

“VideoDescription”=”NVIDIA GeForce 8400 GS” (Change this to your current Graphics card setting)
“VideoMemorySize”=”500″   (Use your current video memory size)

  is done.


Installing more than a software or game using wine can result a conflict, because every software use native  libraries or different configuration of wine to work properly, that is why it is advised in this case to use wineprefix, 

{xtypo_quote_right}A prefix holds a virtual windows with separate wine settings (drives, virtual desktop, special dlls and so on)

Prefixes are set with the environment variable WINEPREFIX{/xtypo_quote_right}

Wineprefix permit to create a different folder with different configuration for each installed software or Game using wine.

Using wineprefix :

To use wineprefix, when you want to install a software run this command:

WINEPREFIX=/home/zinovsky/.WINEPREFIX wine softwarename.exe 

*Change /home/zinovsky to your current home directory  

*For each installed software or game use for example :/home/zinovsky/.WINEPREFIX1 for game1 ,/home/zinovsky/.WINEPREFIX2 for game 2……etc.



  •  How to prevent Wine from changing the filetype associations on the system or adding unwanted menu entries/desktop links when you install a Windows program?

If you do not want the installer for a Windows app to change filetype associations, add menu items, or create desktop links, then you have to disable winemenubuilder.exe . There are several ways to do this:

  1. In winecfg: before running the installer, run winecfg. Go to the Libraries tab and type winemenubuilder.exe into the “New overrides” box (it is not in the dropdown list). Click add, then select it from the “Existing overrides” box. Click “Edit” and select “Disable” from the list, then click “Apply.”

  2. Registry file: If you need to apply the setting many times (e.g., every time you recreate the Wine prefix), this approach may be more convenient. Create a text file named with extension .reg (e.g., disable-winemenubuilder.reg) containing the following:


    To apply the setting, run:

    regedit disable-winemenubuilder.reg
  3. Environment variable: set the WINEDLLOVERRIDES environment variable when you run the installer, example

    WINEDLLOVERRIDES=winemenubuilder.exe=d wine setup.exe

Disabling winemenubuilder.exe will cause wine programs to print errors that they cannot find it (though the errors do not seem to interfere with program operation). An alternative approach that avoids the errors is to replace it with the do-nothing program. Compile the following with MinGW’s gcc under wine and place the executable at C:WindowsSystem32winemenubuilder.exe :


#include <stdio.h>
int main()
/* Do nothing */
return 0;


Then follow the same procedure as above, but set winemenubuilder.exe to “native” instead of “disable” in winecfg, or use the following registry file or environment variable:

WINEDLLOVERRIDES=winemenubuilder.exe=n wine setup.exe
  • Remove all programs installed under Wine

To remove all programs installed under Wine, remove the wineprefix (usually the ~/.wine directory) by pasting the following command into a terminal:

rm -rf $HOME/.wine

But that doesn’t remove them from the system menu; to clean out the menus, carefully paste the following commands into a terminal:

rm -f $HOME/.config/menus/applications-merged/wine*
rm -rf $HOME/.local/share/applications/wine
rm -f $HOME/.local/share/desktop-directories/wine*
rm -f $HOME/.local/share/icons/????_*.{xpm,png}
rm -f $HOME/.local/share/icons/*-x-wine-*.{xpm,png}

Is done.

{module post forum}

Useful Links:Thanks to Ubuntulife, wineHQ

{module user9-footer}

  • Shannon VanWagner

    This is a great in-depth article, thanks for writing it!

    One problem I’m seeing is:
    sudo add-apt-repositoryppa:ubuntu-wine/ppa

    Should be:
    sudo add-apt-repository ppa:ubuntu-wine/ppa


  • Zinovsky

    Thanks- Fixed.

  • Cam

    What goes in VideoDriver if you have ATI?

  • http://Importantquestion Zinovsky

    Thanks for this question, if you have ATI GPU use this :

  • Anonymous

    What about for Intel graphics?

  • Anonymous

    fine then, don’t answer my fu**ing question

  • Ali

    If this works for me ,then may Almighty Allah’s blessings shower on you

  • Ali

    1.You have given libraries for XP,what would be the libraries for Win 7?
    2.When I executed winetricks,I could see alot of libraries,please give a lst of libraries which are important?
    Today I am installing the xp libraries!(internet connectio is slow)

  • Ali

    I am done through installing the libraries & it worked quite well.Thanks a ton!
    Right now I am doing the wineprefix part,it too works but creates the default set of wine libraries.I can,t again & again install the xp libraries,I have a painfully slow internet connetion.So help me out?
    you haven’t replied to my previous query,Hope you do it soon?

  • HerminiaBush31

    I will recommend not to wait until you get enough money to order goods! You should get the credit loans or just car loan and feel yourself fine

  • http://enteryoursiteURL... Dave

    Hi, i have a Nvidia Geforce 7000m, how should i put that on "VideoDescription"?

  • JeannieSerrano33

    I would like to propose not to wait until you earn big sum of money to buy different goods! You can get the loan or just consolidation loans and feel comfortable

  • SUSIEBernard

    When you’re in uncomfortable position and have no money to go out from that point, you will have to take the loan. Just because it will help you emphatically. I take college loan every year and feel myself fine because of that.

  • Billie Logan

    I keep getting stuck with adding libraries…

    “wineserver not found!”

  • Paul Magarey

    I get stuck at the first command – the ‘-purge’ seems to be the problem.

    E: Command line option ‘p’ [from -purge] is not known.

  • ewbun2

     use 2 hyphens instead of the single hyphen

  • Al3nizy

    very good , Thanks bro

  • nishad

    hello sir what all i have to do if i have ati graphic card? for those things tou did fo nvida

  • nishad

    what all i have to do if i have ATI graphic card?

  • nishad

    i havnt install directx “./winetricks d3dx9 dr….” does this command still work for me?

  • nishad

    how to install directx on linux?

  • nishad

    i need to instal directx or i will fking die

  • 簡能

    To Install Direct X , Just Goto Wine Tricks>Select Defult….>Install a Windows DLL or Component >
    Then Install all starts with d3dx…

  • Pingback: Nerd of the Montain Labs » » Tutorial de Wine para 64-bit()

  • Pingback: Ubuntu:Installing PHYSX under WINE – Ubuntu Linux Questions()