Play your Windows Games with Wine and DirectX
November 27, 2007
Microsoft DirectX is a collection of libraries for game programming. With Runtime installed on your Windows Desktop you can run the most important commercial games. On linux you can't have DirectX installed natively as part of system and there isn't a Linux Binary versione of it. So, you can't run windows games on Linux. To have DirectX games on your Linux you can try Wine. Wine (wine is not emulator) is a wrapper of windows libraries, so you can use windows software on your Linux Desktop. Many of windows software don't run on Linux with Wine, but you can try particular configuration of Wine to see if you can run your favorite windows game or software. To install a Windows Game on Linux you have to install and configure DirectX on wine. This tutorial explain how to install DirectX.
To follow this tutorial I'm assuming that you have installed Wine on your System. In Ubuntu Gutsy: sudo apt-get install wine.
First of all you have to configure your Wine Virtual Desktop with $ winecfg. With this tool you can configure many importants aspects of your Wine Tool. I have configured my Virtual Desktop with a resolution of: 1280x1024 (You can set it to cover your needs). In the Audio tab you can configure Audio Drivers and test it playing test sound. I have configured it with ALSA drivers, but you could user also OSS drivers depending of your Audio Drivers installed on your Linux System. To make a good installation of DirectX on Wine you have to install native mscoree.dll and streamci.ddl in /system32 from a windows Install and set them as native Windows Libraries.
You have to wrap with winecfg many DirectX dlls, so you can add "d3d8" with winecfg and then with "sudo gedit /home/your_user/.wine/user.reg" add this list of dlls:
[Software\\Wine\\DllOverrides]
"d3d8"="builtin"
"d3d9"="builtin"
"d3dim"="native"
"d3drm"="native"
"d3dx8"="native"
"d3dxof"="native"
"dciman32"="native"
"ddrawex"="native"
"devenum"="native"
"dinput"="builtin"
"dinput8"="native"
"dmband"="native"
"dmcompos"="native"
"dmime"="native"
"dmloader"="native"
"dmscript"="native"
"dmstyle"="native"
"dmsynth"="native"
"dmusic"="native"
"dmusic32"="native"
"dnsapi"="native"
"dplay"="native"
"dplayx"="native"
"dpnaddr"="native"
"dpnet"="native"
"dpnhpast"="native"
"dpnlobby"="native"
"dsound"="builtin"
"dswave"="native"
"dxdiagn"="native"
"mscoree"="native"
"msdmo"="native"
"qcap"="native"
"quartz"="native"
"streamci"="native"
Now, you have DirectX wrappers configured correctly but you have to install DirectX 9.0c to complete succesfully your job. Download DirectX form here: http://filehippo.com/download_directx/
you have to extract DirectX in a directory of your choice (z:\home\your_user\directx) and then run setup:
$ wine directx_nov2007_redist.exe
$ cd /home/your_user/directx/
$ wine DXSETUP.EXE
God Job! You have installed DirectX with Wine on your Linux Desktop. To test it you can run dxdiag.exe:
$ cd /home/your_user/.wine/drive_c/windows/system32
$ wine dxdiag.exe










Hi
Everything seems to work but I don’t have any dxdiag.exe … I tried to copy one from a windows install, but it crashed …
Anyone could make it work on gutsy ?
Is there a way for me to get those two files without windows at all? I haven’t had windows for years.

You can PM me if you like. Perhaps just copying yours would work.
I have tried constantly for over four hours!
I get ‘err:setupapi:do_file_copyW Unsupported style(s) 0×144′ during the install of DXSETUP.EXE and ‘wine: could not load L”c:\\windows\\system32\\dxdiag.exe”: Module not found’ when trying to run dxdiag.exe
I guess this doesn’t work, and we should just pull out our wallets and sell our souls to cedega!
I won’t be playing ‘call of duty4′ tonight!
kubuntu 7.10 - e2200 - 2GB - 512mb 8400gs
Have problem with DXsetup. exe cannot open cab, tells cab is not trusted, you need cryptographic services to valid cab file.
[…] can take some DirectX games and Emulate them so Ubuntu will recognize it. I found a link on how to install DirectX9 in Ubuntu. I am not sure if it works. What games are you trying to run in Ubuntu? Because most top of the […]