How To Install the CoD4x Client And Steam On Linux Using Wine

Recommended Posts

I couldn't find a good way to get CoD4x up and running with steam correctly on Linux anywhere so I did it myself and made this tutorial to help the next guy. I made markup text version pull request on github as well HERE if you are interested. Hopefully it gets approved eventually. It is tricky now because you cannot just run modern warfare without steam when you join servers.

1) Run the following command and the following ones in the Linux terminal to remove old wine if not on 5.0

sudo apt remove winehq-stable wine-stable wine1.6 wine-mono wine-geco winetricks

2) Add support for 32 bit apps

sudo dpkg --add-architecture i386

3) Download wine repository key

wget -qO - | sudo apt-key add -

4) Add the downloaded repository key

sudo apt-add-repository "deb $(lsb_release -cs) main"

5) Install Wine 5.0

sudo apt update && sudo apt install --install-recommends winehq-stable

6) Now run this command to check your wine version. If it says 5.0 your good!

wine --version


7) Your files will be installed in a hidden .wine folder Example : /home/USERNAME/.wine/drive_c


8 ) Download the windows steam install from steams website HERE.

9) Go to your terminal and go to your download directory Replace USERNAME with your own and the name of the executable file. NEVER USE ROOT/SUPER USER FOR WINE COMMANDS!

cd /home/USERNAME/Downloads
wine SteamSetup.exe

10) If done right the steam install window will show up. Install Steam like normal. Delete the steam folder in the wine C drive as shown above if it already exists (WIne 5.0 creates this folder by default I think).


11) After steam is done do these similar steps to install Call of Duty 4 Modern Warfare via wine. You first install Call of Duty 1.0 by going to the directory and run Wine Setup.exe like with steam and install it via the default directory. You do not have to install direct x so answer no for that.

wine Setup.exe


12) Then you download and install patch 1.6 the same way (you have to wait 10+ minutes for it to load after click install - IT ALWAYS HANGS FOR 10 MINUTES JUST WAIT!)

cd /home/USERNAME/Downloads
wine cod4mw-1.6-patchsetup.exe


13) Download and Install patch 1.7 the same way but it shouldn't hang.

cd /home/USERNAME/Downloads
wine cod4mw-1.7-patchsetup.exe


13b) Download the cod4xme client files folder and place them in your Call of duty modern warfare folder. Example: /home/james/.wine/drive_c/Program Files (x86)/Activision


13c) Go to your cod4x18_v17_9_client folder directory and run the install.cmd script using the command interpreter with wine.

cd '/home/USERNAME/.wine/drive_c/Program Files (x86)/Activision/Call of Duty 4 - Modern Warfare/cod4x18_v17_9_client'
wine cmd.exe /C install.cmd


13d) If done correctly you should see the cod4x_017 files in "/home/YOURUSERNAME/.wine/drive_c/users/YOURUSERNAME/Local Settings/Application Data/CallofDuty4MW/bin/cod4x_017"


14) Go to the C:/Program Files (x86) directory and Run steam via Wine 5.0. You need to use special arguments "-no-cef-sandbox" or else Steams web forms will not load! ITS A STUPID BUG IN STEAM >.<. Replace USERNAME with your own.

cd '/home/USERNAME/.wine/drive_c/Program Files (x86)/Steam'
wine Steam.exe -no-cef-sandbox

15) Log into your steam account. If you do not have one CREATE ONE. You have no choice now if you want to play on the latest version sadly.


16) If you ran wine with the correct arguments above you can actually see the Steam pages load as shown below.


17) Click on Games -> Add Non-Steam Game To Library


18) Call of Duty 4 Modern Warfare Single Player and Multiplayer should show up. Select them both and click add selected programs.


19) Go to Games -> View Games Library


20) Click on Call of Duty Multiplayer and click play. If you did it correctly you will see the steam overlay in the bottom right corner. Join a server with the 1.8 patch and it will update your client if you did not run the install.cmd script above (you have to run COD 1 or 2 times again the finalize the update). The install.cmd scrip with cod4x will not run correctly in wine. You have to place the files manually as shown above. It is easier to just join a cod4x server and update that way. The user name in your steam profile is the name you will see in game.


if its patched correctly you should see the following with 17.9 in the corner.


If you did not you will see this lovely Error loading Cod4X popup: "Failed to load CoD4X because file cod4x_xxx.dll or entry point was not found. Attempting to load Cod4 v1.7". Its because it cannot find the application data folder in the right place based on your user name.


21) Run steam via wine to play COD4x any time you want to via Steam. If your lazy you can configure it in via Lutris below.

cd '/home/USERNAME/.wine/drive_c/Program Files (x86)/Steam'
wine Steam.exe -no-cef-sandbox


sudo add-apt-repository ppa:lutris-team/lutris
sudo apt-get update
sudo apt-get install lutris

23) Run Lutris via the applications portal. Click on the plus button -> Add Game


24) Enter the name of your program "Steam". Select the Runner as Wine. You shouldn't have to install specific runners since 5.0 is installed.


25) Click on Game Options at the top. Find your steam executable location. replace USERNAME with your own if you copy paste the path below. Enter the arguments "-no-cef-sandbox" or STEAM PAGES WONT LOAD! Leave the Prefix architecture as Auto (default).

/home/USERNAME/.wine/drive_c/Program Files (x86)/Steam/Steam.exe


26) Click on Runner options at the top and make sure the Wine version is System (5.0). Un-Enable D9VK as its merged into the DXVK libraries now (thanks AlexC) Click the Save button.


27) Now you can just select Steam and click play and even make a desktop shortcut or app shortcut.


That is all folks.



Edited by Alleviate

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.