Escolar Documentos
Profissional Documentos
Cultura Documentos
(Page 1 of 2 )
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.
This tutorial is for Wine beginner users in Ubuntu who want to optimize their gaming
experience and need to learn about WinePrefix.
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.
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 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:
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
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:
You are now ready to install the game in its newly-created wineprefix folder.
Step 1. Copy the game installer folder (those folders with the .exe file) to /home/user
directory.
Step 2. In the terminal, below you'll find the command you need to use to install the
game Grand Theft Auto San Andreas into its specific wine prefix folder, created earlier:
codex-m@codex-m-desktop:~$ WINEPREFIX="/home/codex-m/grandtheftauto" wine
"GTA/gtasampleinstaller.exe"
In the above example command, the installer folder is named GTA and contains the
installer file gta_sa.exe
Note: For those games installed using a CD, you need to mount the CD and then proceed
to Wine installation. More details here: http://www.thelupine.com/content/wine-and-
wineprefix-variable
Some games do not need to be installed and ready to play (you can manage simply by
double clicking the application .exe). In this case, it will be very easy. Just place the game
folder inside “Program files” in /home/codex-m/grandtheftauto/drive_c/Program Files
To launch or play the game using the default Wine registry settings, go to the game folder
path:
/home/codex-m/grandtheftauto/drive_c/Program Files/GTA/
Right click on the application (.exe file) and then click “Open with Wine Windows
Program Loader.”
Of course, now that it is installed or running, the last step is the optimization of the game
for best game experience. This is done using Wine registry tweaks.
Step 1: Launch and play the installed game first, and then jot down the problems. These
may include things like a laggy/low FPS, no sound, poor video, and more. It is also
important to take note of your Wine and Ubuntu version.
Step 4: In the “Name contains,”, enter the name of the game, and then press “update
Filter.”
The main objective of going into the Wine application database is to get some tips on
how to solve the common game problems mentioned in step one.
One you are on the game application page, feel free to read a lot of information
pertaining to improving the game's performance.
At this URL: http://appdb.winehq.org/objectManager.php?bIsQueue=
false&bIsRejected=false&sClass=version&sTitle=&sReturnTo=&iId=3780, look under
“Warning – Graphics and Performance.” The following registry tweaks are suggested:
b. Unchecking the “Allow Pixel Shader.” This also means disabling the pixel shader.
1. Go to /home/codex-m/grandtheftauto/drive_c/windows.
2. Find regedit.exe. Once you find it, right click on it and click “Open with Wine
Windows Program loader.” This will launch the Registry editor.
3. Expand “HKEY_CURRENT_USER.”
4. Expand “Software.”
5. Expand “Wine.”
6. Click “Direct3D.”
7. Double click “VertexShaderMode,” set the value data to “none” and then click OK.
8. Double click “PixelShaderMode,” set the value data to “disabled” and then click OK.
The Direct3D registry entries should now look like those in the screen shot below:
9. Go to “Registry” and then click “Exit.” You can even implement more tips as provided
by users in the Wine application database.
Here is another useful trick that can improve your game's performance, particularly if you
are using the Nvidia video card. Go to System –> Administration –> Nvidia X Server
Settings. Click “OpenGL Settings” and adjust it to “High Performance.” Of course, some
of the most important settings that you can change to improve your game's performance
are the game's own video settings. Things like setting video quality to “low” and turning
off any fancy video effects can really speed up gaming and reduce lag.
You are now ready to install the game in its newly-created wineprefix folder.
Step 1. Copy the game installer folder (those folders with the .exe file) to /home/user
directory.
Step 2. In the terminal, below you'll find the command you need to use to install the
game Grand Theft Auto San Andreas into its specific wine prefix folder, created earlier:
In the above example command, the installer folder is named GTA and contains the
installer file gta_sa.exe
Note: For those games installed using a CD, you need to mount the CD and then proceed
to Wine installation. More details here: http://www.thelupine.com/content/wine-and-
wineprefix-variable
Some games do not need to be installed and ready to play (you can manage simply by
double clicking the application .exe). In this case, it will be very easy. Just place the game
folder inside “Program files” in /home/codex-m/grandtheftauto/drive_c/Program Files
To launch or play the game using the default Wine registry settings, go to the game folder
path:
/home/codex-m/grandtheftauto/drive_c/Program Files/GTA/
Right click on the application (.exe file) and then click “Open with Wine Windows
Program Loader.”
Step 1: Launch and play the installed game first, and then jot down the problems. These
may include things like a laggy/low FPS, no sound, poor video, and more. It is also
important to take note of your Wine and Ubuntu version.
Step 4: In the “Name contains,”, enter the name of the game, and then press “update
Filter.”
The main objective of going into the Wine application database is to get some tips on
how to solve the common game problems mentioned in step one.
One you are on the game application page, feel free to read a lot of information
pertaining to improving the game's performance.
b. Unchecking the “Allow Pixel Shader.” This also means disabling the pixel shader.
1. Go to /home/codex-m/grandtheftauto/drive_c/windows.
2. Find regedit.exe. Once you find it, right click on it and click “Open with Wine
Windows Program loader.” This will launch the Registry editor.
3. Expand “HKEY_CURRENT_USER.”
4. Expand “Software.”
5. Expand “Wine.”
6. Click “Direct3D.”
7. Double click “VertexShaderMode,” set the value data to “none” and then click OK.
8. Double click “PixelShaderMode,” set the value data to “disabled” and then click OK.
The Direct3D registry entries should now look like those in the screen shot below:
9. Go to “Registry” and then click “Exit.” You can even implement more tips as provided
by users in the Wine application database.
Here is another useful trick that can improve your game's performance, particularly if you
are using the Nvidia video card. Go to System –> Administration –> Nvidia X Server
Settings. Click “OpenGL Settings” and adjust it to “High Performance.” Of course, some
of the most important settings that you can change to improve your game's performance
are the game's own video settings. Things like setting video quality to “low” and turning
off any fancy video effects can really speed up gaming and reduce lag.