Home arrow Site Administration arrow How to Use WinePrefix in Ubuntu to Optimize Gaming

How to Use WinePrefix in Ubuntu to Optimize Gaming

Do you play a lot of Windows-based games using Wine? You may have found that some games don't play as well as others (or possibly at all). This article explains why this issue exists, and how you can solve the problem with WinePrefix.

TABLE OF CONTENTS:
  1. How to Use WinePrefix in Ubuntu to Optimize Gaming
  2. Installing and running a game in a WinePrefix game specific folder
By: Codex-M
Rating: starstarstarstarstar / 3
November 16, 2010

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

Wine lets you play Windows-based game applications in Ubuntu. However, the default setup does not offer a perfect gaming environment. This is true for two reasons. First, different games might require that you use different gaming configurations with Wine registry tweaks; they might even be optimized for different Wine versions. Second, a default setup only has one registry configuration, which means that only one registry configuration will be used for all installed games.

For the optimal gaming experience, you need different Wine registry configurations for each of the games you play in Wine.

For example, if you play Starcraft Broodwar, it has its own Wine registry configuration. If you play Counterstrike Source, it also has its own registry configuration, which is different from the one Starcraft Broodwar uses. In this way, you will never need to worry that a single tweak in a registry configuration for that single game will affect other games.

The solution to this problem is to use WinePrefix

This tutorial is for Wine beginner users in Ubuntu who want to optimize their gaming experience and need to learn about WinePrefix.

Understanding WinePrefix Operation

By default, after you have installed Wine in Ubuntu, all games will be installed in the /home/user/.wine/drive_c/Program Files.

The wine directory is also hidden in the user directory. To see the contents of the wine directory, you need to go to Places –> Home Folder. To reveal the wine directory, go to View and then check “Show Hidden Files.”

The hidden folders and files can now be seen. Click “.wine” directory. You should see files and folders like those shown in the screen shot below:

The drive_c is a virtual Windows C drive, and the system.reg/user.reg/userdef.reg are the registry files, similar to a Windows registry.

These registry files are the ones that will be tweaked to optimize your gaming experience in Wine (sound and direct3d adjustments, etc).

WinePrefix works by creating another Wine directory, aside from the original .wine directory. This new directory is where you can install other games that need dedicated registry configurations.

WinePrefix creates the same default files and folders as in the original .wine installation. This means a newly-created Wine directory also has its own dedicated virtual Windows C drive and registry files.

Suppose an Ubuntu user named “codex-m” needs to install three Windows-based games (Starcraft, Counterstrike, Warcraft) using WinePrefix. The following might be the resulting Wine file system structure created by both default wine and WinePrefix installation:

The default Wine directory path (in blue) is still there where default programs are  installed (non-gaming applications for example). The 3 game-specific Wine directory path (yellow, green and pink) are created by Wineprefix.

Creating a game-specific Wine directory using WinePrefix

Now you have a clear understanding of how WinePrefix works. In this section you will learn how to create a game-specific Wine directory using WinePrefix.

Note that in this tutorial, I use exact values to illustrate actual examples or commands. Remember to replace these example values with your own file, folder and game application names.

You can create one game-specific wine directory at a time. The following are the steps:

Step 1. Go to Applications –> Accessories –> Terminal.

Step 2. Make sure you are in your user directory/directory. To be sure, type the pwd command at the Linux prompt; it should return /home/yourubuntuusername. For example:

codex-m@codex-m-desktop:~$ pwd
/home/codex-m

Step 3. You need to create the game directory (using the mkdir command) first in your user folder/directory. Name the directory using the name of the game to be installed. Suppose a game called “Grand Theft Auto San Andreas” will be installed using WinePrefix in /home/codex-m directory:

codex-m@codex-m-desktop:~$ mkdir grandtheftauto

Step 4. Now that the grandtheftauto folder has been created, let's create the Wine system files and directories for this specific game using Wineprefixcreate:

codex-m@codex-m-desktop:~$ WINEPREFIX="/home/codex-m/grandtheftauto" wineprefixcreate

Note: Depending on your Ubuntu/Wine versions, the wineprefixcreate command is deprecated. But you can still run it; it might provide some warnings, which you can just ignore.

Screen shot at the Terminal: http://www.php-developer.org/screenshot/screenshotterminalwineprefix.jpg

What happens is that a game-specific wine directory has been created in /home/codex-m/. When you go to this path, a new folder, “grandtheftauto,” has been created with the same files as the default Wine installation shown previously. Here is a screen shot:



 
 
>>> More Site Administration Articles          >>> More By Codex-M
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

SITE ADMINISTRATION ARTICLES

- Coding: Not Just for Developers
- To Support or Not Support IE?
- Administration: Networking OSX and Win 7
- DotNetNuke Gets Social
- Integrating MailChimp with Joomla: Creating ...
- Integrating MailChimp with Joomla: List Mana...
- Integrating MailChimp with Joomla: Building ...
- Integrating MailChimp with Joomla
- More Top WordPress Plugins for Social Media
- Optimizing Security: SSH Public Key Authenti...
- Patches and Rejects in Software Configuratio...
- Configuring a CVS Server
- Managing Code and Teams for Cross-Platform S...
- Software Configuration Management
- Back Up a Joomla Site with Akeeba Backup

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: