Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save basperheim/878a91d69f47c86efa91fcee65fa35db to your computer and use it in GitHub Desktop.
Save basperheim/878a91d69f47c86efa91fcee65fa35db to your computer and use it in GitHub Desktop.
Overview of how to use Wine in Linux to play old 32-bit Windows games

Setup Wine for Linux to play old Windows games

What is the best way to use Wine in Arch Manjaro to run old PC games (from the XP era of Windows, but after DOS, so DOSBOX is NOT an option)?

What are some steps to do this, and pitfalls I should avoid?

Running old PC games on Arch Manjaro using Wine can be a rewarding way to relive some classics from the XP era. Here's a step-by-step guide and some tips to help you get started:

Step-by-Step Guide

  1. Install Wine: Open a terminal and install Wine using the package manager.
sudo pacman -S wine
  1. Install Winetricks (Optional but Recommended): Winetricks is a script that helps you install and manage libraries required by Windows applications.
sudo pacman -S winetricks
  1. Create a 32-bit Wine Prefix: Many old games run better on a 32-bit Wine environment.
WINEPREFIX=~/wineprefix32 WINEARCH=win32 winecfg

This command creates a 32-bit Wine prefix in the ~/wineprefix32 directory and opens the Wine configuration.

  1. Configure Wine: In the Wine configuration window, set the Windows version to Windows XP. This can help with compatibility.
winecfg
  1. Install Required Libraries and Components: Use Winetricks to install any necessary libraries. For example, many games might need DirectX, Visual C++ Redistributables, or .NET Framework.
WINEPREFIX=~/wineprefix32 winetricks

Navigate through the menu to install required components.

  1. Install and Run the Game: Use the Wine prefix to install and run your game. Replace setup.exe with the actual installer or executable of your game.
WINEPREFIX=~/wineprefix32 wine setup.exe

Tips and Pitfalls to Avoid

  1. Check WineHQ App Database: Before you start, check the WineHQ App Database (https://appdb.winehq.org/) for your game. The database often has valuable information on how well a game runs and any special steps required for setup.

  2. Managing Multiple Games: Create separate Wine prefixes for different games if they require different configurations or libraries. This prevents conflicts.

WINEPREFIX=~/wineprefix_game1 WINEARCH=win32 winecfg
  1. Use Wine Staging: Wine Staging includes patches and features that are not in the stable release. It can sometimes improve game compatibility.
sudo pacman -S wine-staging
  1. Performance Tweaks:

    • Use the winecfg graphics tab to tweak settings like "Emulate a virtual desktop" to prevent resolution issues.
    • Set the "Video memory size" to match your GPU.
  2. Graphics Drivers: Ensure you have the latest drivers for your GPU installed. For NVIDIA, you might need nvidia, nvidia-utils, and lib32-nvidia-utils. For AMD, ensure mesa and lib32-mesa are up to date.

  3. Debugging: If a game doesn’t run properly, start Wine with debugging enabled to see detailed logs.

WINEDEBUG=+all WINEPREFIX=~/wineprefix32 wine game.exe &> wine.log

Check wine.log for errors and search for solutions online.

  1. Avoid Symlinks: Avoid using symlinks in Wine prefixes as they can cause unexpected behavior.

  2. Backup Wine Prefixes: Regularly backup your Wine prefixes once you have them working well to avoid having to redo configurations if something goes wrong.

    tar -czvf wineprefix32_backup.tar.gz ~/wineprefix32

Conclusion

Using Wine on Arch Manjaro to run old PC games from the XP era can be an enjoyable experience with some setup and tweaking. By following these steps and tips, you can maximize your chances of success and minimize frustrations. Happy gaming!

Running the EXE using Wine

What does this WinePrefix GUI thing do? I got it running, but now what? Do I keep that running while I run a wine command in another terminal?

-rw-r--r--   1 benji benji 526497376 Jun 26 13:47 'setup_deadlock_ii_shrine_wars_1.20_hotfix_(40447).exe'
    ~/Downloads  pwd                                                                                                                                           ✔ 
/home/benji/Downloads
    ~/Downloads  file setup_deadlock_ii_shrine_wars_1.20_hotfix_\(40447\).exe                                                                                  ✔ 
setup_deadlock_ii_shrine_wars_1.20_hotfix_(40447).exe: PE32 executable (GUI) Intel 80386, for MS Windows, 9 sections
    ~/Downloads                                                                                                                                                ✔ 

How do I run this EXE now with wine?

Great, you've got Wine and your 32-bit Wine prefix set up. Now, let's go through the steps to run your .exe file using Wine.

Running the .exe File with Wine

  1. Ensure Wine Prefix is Configured: Make sure your Wine prefix is configured and ready to use. From your log, it seems like the configuration is updated successfully.

  2. Run the .exe File: Open a terminal and navigate to the directory where your .exe file is located. Then run the file using the Wine prefix you configured.

WINEPREFIX=~/wineprefix32 wine setup_deadlock_ii_shrine_wars_1.20_hotfix_(40447).exe

This command tells Wine to use the specified Wine prefix and runs the .exe file within that environment.

Addressing Potential Issues

  1. Missing Dependencies: The errors in your log indicate some missing dependencies (Microsoft.Windows.Common-Controls, wineusb.sys). You might need to install these using Winetricks.
WINEPREFIX=~/wineprefix32 winetricks comctl32
  1. Permissions: Ensure the Wine prefix and the directory where the .exe file is located have the correct permissions.
chmod +x ~/Downloads/setup_deadlock_ii_shrine_wars_1.20_hotfix_(40447).exe

Keeping the Wine Configuration GUI Running

  • The Wine configuration GUI (winecfg) does not need to be running while you execute the Wine command in another terminal. You can close the GUI once your configurations are saved.

If you have made necessary changes and closed winecfg, your configurations are saved in the Wine prefix directory (~/wineprefix32 in your case).

Summary of Commands

  1. Set Up Wine Prefix:
WINEPREFIX=~/wineprefix32 WINEARCH=win32 winecfg
  1. Install Missing Dependencies (if needed):
WINEPREFIX=~/wineprefix32 winetricks comctl32
  1. Navigate to the Directory and Run the .exe:
cd ~/Downloads
WINEPREFIX=~/wineprefix32 wine setup_deadlock_ii_shrine_wars_1.20_hotfix_(40447).exe

This process should allow you to run the game installer and then subsequently run the game. If you encounter any specific errors during the installation, those logs can provide clues on what additional steps may be needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment