Install DirectX 9.0c on Ubuntu 8.10 using Wine


Please shareShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInShare on RedditDigg thisShare on StumbleUponShare on VKBuffer this page

directxWine is a implementation of Windows API on Linux. Even if it is quite complete, it still miss some DirectX functionalities. This article present how to add this missing functionalities by installing native DirectX 9.0c in your Wine environment.


For Ubuntu 8.04 Hardy Heron, use :

sudo wget -O /etc/apt/sources.list.d/hardy-winehq.list
wget -q -O- | sudo apt-key add -
sudo apt-get update

For Ubuntu intrepid 8.10 i installed wine  using the command :

apt-get install wine

You will now be able to install the last version of Wine with apt-get.

Wine environment setup

First, we install needed softwares:

/usr/bin/sudo /usr/bin/apt-get install wine cabextract wget
For ubuntu 8.10 use the command :
/usr/bin/sudo /usr/bin/apt-get install wine 

We create the Wine environment folder:


We configure the sound so that Wine use ALSA:

/usr/bin/regedit /tmp/audio.reg

Video memory amount setup

We must tell Wine the amount of Video memory present on our graphic adapter. First, download the template registry file:


We update the template with a auto-detected value that should fit to our system (if you have more than 256 MB of Video memory, the auto-detected value will only be of 256 MB):

/usr/bin/lspci | /bin/grep VGA | /bin/sed -e 's/^([^ ]* ).*/1/' 
    | /usr/bin/xargs -iPCIID /bin/sh -c "/usr/bin/lspci -v -s PCIID"
    | /bin/grep Memory | /bin/sed -e 's/.*size=([0-9]*).*/1/'
    | /usr/bin/sort -g | /usr/bin/tail -n1
    | /usr/bin/xargs -iVIDEORAM /bin/sed -i -e 's/VIDEO_RAM/VIDEORAM/' /tmp/video_ram.reg

And we insert the corresponding registry key into Wine registry:

/usr/bin/regedit /tmp/video_ram.reg

DOS memory space access

In Ubuntu 8.04 Hardy Heron, access to the beginning of memory space is disabled for security reasons. For some old games (Caesar III for exemple), this access is needed. To allow access to this memory area, une these command lines:

/usr/bin/sudo /bin/cp /etc/sysctl.conf /etc/sysctl.conf.back
/usr/bin/sudo /bin/sed -i -e 's/^(vm.mmap_min_addr =) .*/1 0/' /etc/sysctl.conf
/usr/bin/sudo /sbin/sysctl -p


DirectX installation

Once Wine configured, we download some files needed to install DirectX:


And we register DirectX DLLs as native in the registry:

    --output-document /tmp/directx.reg
/usr/bin/regedit /tmp/directx.reg

We download DirectX 9.0c installer:


We extract its contents:

/bin/mkdir $HOME/.wine/drive_c/DIRECTX
/usr/bin/cabextract -d $HOME/.wine/drive_c/DIRECTX /tmp/directx_redist.exe

And we install DirectX 9 :

/usr/bin/wine "C:DIRECTXDXSETUP.exe"
Pic1 : Directx installation 

You can now test your installation by running dxdiag:

/usr/bin/wine "C:windowssystem32dxdiag.exe"
Pic2 Test Directx installation 

Note: The test is to actually run dxdiag, don‘t expect all tests runned by this software to work.Once the install done and tested, we can do a little clean up:

/bin/rm /tmp/directx_redist.exe
/bin/rm -r $HOME/.wine/drive_c/DIRECTX


HTML renderer install

This step is mandatory for installing Source games (Half-Life 2, Counter Strike, etc…):

First, download WineTricks :


Then install Gecko HTML render with this command line:

/bin/sh $HOME/.wine/winetricks gecko

Now, test your installation with:

/usr/bin/wine "C:Program FilesInternet ExplorerIEXPLORE.EXE"

Active Movie installation

Active Movie is needed for displaying video for some games. First, dowload the DLL file needed to install this software:


And download the Active Movie installer:


Install Active Movie:

/usr/bin/wine /tmp/amov4ie.exe
Pic3 :  Active movie installation

And configure wine to use natively the amstream DLL:

/usr/bin/regedit /tmp/active_movie.reg

And registrer this DLL in the registry:

/usr/bin/regsvr32 "c:windowssystem32amstream.dll"

QuickTime installation

QuickTime is needed to display videos in some games, such as Myst, RHEM 2, etc. First, download the QuickTime 6.5.2 installer:


And run it:

/usr/bin/wine /tmp/quicktimefullinstaller-6-5-2.exe

At the end of the install, your screen black out (at least, it is what it does on my computer). Don’t worry, it is a little display bug. We are going to solve it. Launch the QuickTime settings software:

/usr/bin/wine "c:windowssystem32rundll32.exe" shell32.dll,Control_RunDLL QuickTime.cpl

And change the following parameters:

  • In section “Browser Plug-in”, uncheck “QuickTime system tray icon”.
  • In section “Video Settings”, choose “Save Mode (GDI Only)”.

You can now close the QuickTime settings.



Guild Wars

First, download the game installer:


Uncompress it:

/usr/bin/unzip -d $HOME/.wine/drive_c/ $HOME/.wine/drive_c/

Download the optimized settings for Guild Wars and add them to the Wine registry:

--output-document /tmp/guild_wars.reg
/usr/bin/regedit /tmp/guild_wars.reg

Now, install Guild Wars:

/usr/bin/wine "C:GwSetup.exe"
After the installation is done you can make some optimistaion to the installation .
Once the installation is done , type in the terminal :

env WINEDEBUG=-all WINEPREFIX=”~/.wine” wine “Z:bingwGw.exe”

Replace the “Z:bingwGw.exe” with your location

Now we have to make some optimizations :

1- Open winecfg and set default to win98
For audio acceleration set to Alsa In Audio set ALSA Hardware Acceleration to Emulation and check Driver Emulation

2– Import the latest WINE repo. Add the following to your /etc/apt/sources.list

hardy main

and then type

sudo aptitude update

Gw.exe Switches

-diag Creates, at startup a file where saved the hardware information and the Network tests, the file is located in your game directory ..Guild WarsNetworkDiag.log , make sure to remove it once Guild Wars has finished creating the logfile.
-dsound Forces the use of old DirectSound software mixer. Good for users whose computers are not compatible with the newer version.

-dx8 Useful for troubleshooting. Forces DirectX 8 compatibility; good for users whose computers are not compatible with the newer version. Using this switch with -noshaders may improve performance as well.

-fps # Limits the frame rate to frames per second, saving computer resources.

-image Forces the game to load a complete update. Important: The program terminates after the update is completed; since Guild Wars will not be able run with this parameter on, make sure to remove it after all the content has been downloaded. Downloading all the contents takes approximately 6 hours to complete at 150KB/s (broadband connection). Recommended: Create an additional shortcut on your desktop to Guild Wars that is labeled “Guild Wars Updater” and has this command line switch.

-mute Disables audio output, but still processes audio data internally (so for instance, lip syncing will still function).

-noshaders Troubleshooting option. Using this switch with -dx8 may improve performance as well.

-nosound Disables audio system completely.

-noui Disables the user interface, producing the same effect as when one pushes Ctrl + Shift + H in-game to toggle it.

-perf Displays performance indicators. Triangles, frames per second and transfer rate in bytes per second are displayed in white text in the upper-right corner of the Guild Wars window.

-repair Attempts to fix the GW.dat file, in which all update information is stored. Warning: If a lot of content has already been downloaded through updates, be prepared for a long wait as Guild Wars reconstructs the file.

-sndasio Useful for troubleshooting. Attempts to use an ASIO driver in software mode.

-sndwinmm Attempts to use the Windows Multimedia audio driver in software mode.

-uninstall Uninstalls Guild Wars.

-windowed Forces Guild Wars to run in windowed mode. Note: You can easily switch to windowed mode by pressing ALT + Enter or clicking the window icon in the upper right corner while the game is already running.

Hope that this will help to make the game run in Aspire One onder Ubuntu.


Civilization IV

First, download WineTricks:


And use it to install Microsoft XML 3:

/bin/sh $HOME/.wine/winetricks msxml3

Then, install Civilization IV from the game CD-Rom. And download patch 1.74:


And install it:

/usr/bin/wine /tmp/civilization_iv_patch_v1.74_multi-langues_40669.exe


Steam allow you to install Half-Life 2, Counter Strike, etc. In order to make Steam work, you need the Gecko HTML renderer:

First, download WineTricks :


And use it to install the Gecko HTML renderer:

/bin/sh $HOME/.wine/winetricks gecko

Download the Steam installer:


And run it:

/usr/bin/msiexec /i $HOME/.wine/drive_c/SteamInstall_French.msi

Once the install done, you can delete the Steam installer:

/bin/rm  $HOME/.wine/drive_c/SteamInstall_French.msi

You can now apply the registry settings for the Source engine (for Half-Life 2, Counter Strike, Source, Day of Defeat Source, Portal, etc…):

--output-document /tmp/hl2.reg
/usr/bin/regedit /tmp/hl2.reg

You can now install Half-Life 2, Counter Strike Source, Day of Defeat, Portal, etc…

Trackmania Nations Forever

To run Trackmania Nations Forever, first, apply registry settings for this game:

--output-document /tmp/tmforever.reg
/usr/bin/regedit /tmp/tmforever.reg

Once this done, install the game with Steam.

Once the installation done, replace the file wrap_oal.dll in order to get the sound to work:

/bin/mv $HOME/.wine/drive_c/Program Files/Steam/steamapps/common/trackmania nations forever/wrap_oal.dll
 $HOME/.wine/drive_c/Program Files/Steam/steamapps/common/trackmania nations forever/wrap_oal.dll.back 
--output-document=$HOME/.wine/drive_c/Program Files/Steam/steamapps/common/trackmania nations forever/wrap_oal.dll

Crimson Skies

Crimson Skies needs you to install Active Movie. The install of this software is described earlier in this article.

You also need to install the native imm32 DLL:

/usr/bin/regedit /tmp/cskies_install.reg

Once this done, install the game from the CD-Rom with this command line:

/usr/bin/wine /media/C_SKIES/install.exe

And download a NO-CD patch, the game can not work without it:

/bin/mv $HOME/.wine/drive_c/Program Files/Microsoft Games/Crimson Skies/crimson.exe
 $HOME/.wine/drive_c/Program Files/Microsoft Games/Crimson Skies/crimson.exe.back
--output-document=$HOME/.wine/drive_c/Program Files/Microsoft Games/Crimson Skies/crimson.exe

Now, we copy some files from the CD-ROM so that we can run the game without errors:

/bin/mkdir $HOME/.wine/drive_c/Program Files/Microsoft Games/Crimson Skies/LAUNCHER
/bin/cp /media/C_SKIES/install.exe $HOME/.wine/drive_c/Program Files/Microsoft Games/Crimson Skies/LAUNCHER/
/bin/cp /media/C_SKIES/setupenu.dll $HOME/.wine/drive_c/Program Files/Microsoft Games/Crimson Skies/LAUNCHER/

To run the game, use the following command line, or a error message about broken database will show up:

/usr/bin/wine "C:Program FilesMicrosoft GamesCrimson SkiesLAUNCHERinstall.exe"

Note: The mouse cursor is quite bogus in the menus. On my own, I get it to the target by doing great circular mouvements.

Once you have seen the introduction video, I encourage you to delete it, since i’ve found no way to bypass it. Without doing this, you will lost 3 minutes each time you launch the game:

/bin/rm $HOME/.wine/drive_c/Program Files/Microsoft Games/Crimson Skies/GOSDATA/ASSETS/GRAPHICS/MPG/msopen1.mpg
/bin/rm $HOME/.wine/drive_c/Program Files/Microsoft Games/Crimson Skies/GOSDATA/ASSETS/GRAPHICS/MPG/zipper.mpg
/bin/rm $HOME/.wine/drive_c/Program Files/Microsoft Games/Crimson Skies/GOSDATA/ASSETS/GRAPHICS/MPG/chap0.mpg


RHEM 2 needs you to install QuickTime as described earlier in this article.

Once this done, install the game using for exemple the following command line (if it does not work, launch the “setup.exe” from the “setup” folder on the CD-ROM).

/usr/bin/wine /media/cdrom/setup/setup.exe

and download the No-CD Patch. The game is using the Starforce 2 protection (thank you, Micro Application… ), and it can not work without such a patch.


Enjoy !!!!

This tutorial has been updated by zinovsky to be used on ubuntu 8.10

Many thanks for howto landure for their original tutorial (ubuntu 7.10 and 8.04)