Wiine full user guide-from basic to advanced

Source: Internet
Author: User
Tags builtin
I have been suffering from not having a decent guide to use. Some foreign friends have shared the same feelings with me. Since he is a first-mover, I have to translate.
The author of the original article says it will be updated. Article It is quite new. It introduces a lot of practical wine setting methods, which are very comprehensive and worth reading, No matter new users or old birds.
Original article:
Http://sudan.ubuntuforums.com/showthread.php? T = 497332

Some wine information I collected

If you are like me, when you use wine for the first time, you will be troubled by the current situation of Wine's help articles. There are indeed many howto articles on the Internet to teach you how to use them.ProgramOr game
However, I cannot find a comprehensive "Wine beginner's tutorial" to help me really understand and use the basic knowledge required by wine. I don't need an article that teaches me how to run half-lived 2.
What I want is an article that will teach me how to use wine. Finally, I sorted out the materials collected from many wikis, guides, posts, and howto and wrote this article. Although this article focuses on
To run the game in wine, almost all the information contained in it can be applied to run other programs using wine.

General information
Usage of "winecfg"
Special configuration Materials
Installation Materials
General Materials
Third-party software
Advanced Settings

1. General information

1.1 wine is not an emulator
I will not translate this. There are not many technical introductions.

1.2 use the latest wine
Note
The latest wine version contains bugs not found in the old version. The feisty software warehouse contains 0.9.33, and the latest wine is 0.9.44.
At the time of the article ). 0.9.33 is more stable, but the latest version includes major DirectX improvements. Some games that cannot run in 0.9.33 can run well in 0.9.44.
When kotor2 is running in versions between 0.9.37 and 0.9.40, the sound crashes on my system. That is the best example of a thorny problem caused by the use of the latest version.
I personally recommend that you use the latest version, which provides a better running speed, and basically every bug will be in the future 2 ~ Fixed in 3 versions)

1.3 do not compile and install wine from the source code
The author has not said why, probably because there are too many dependencies to be resolved during compilation.
I personally recommend compilation and installation, so there will be fewer problems after installation and better performance .)

1.4 Terminal
For example
If the installation is correct, wine associates it with the EXE file, so you only need to double-click the EXE file to run it. In any case, this is not the method we recommend to use wine.
Method (Translator: I do not recommend it ). It is better to use the keystore, because it can correctly set the program path, otherwise the program will not find the required file. In addition, an error message is displayed on the terminal,
This is very useful for solving the problem.

1.5 prepare for dealing with setbacks
Wine is not perfect. Not all things can develop smoothly. Sometimes you even need to solve the problem on your own. But now you are a Linux user, and you have to prepare for it.

2 "winecfg" Usage

2.1 run "winecfg"
You must run winecfg at least once to set the wine directory and hardware.

2.2 virtual desktop
Enable
This option can make the software installation smoother. I found that when you do not use this option, using some programs will result in the activated dialog box, cdkey input window, or changing the disc.
The recognition window cannot appear at the front end. Let me think that the program is stuck and kill the process. This option can also prevent the program from locking your desktop or changing your screen resolution to an ugly mode.

2.3 use application settings
You
In the Application label of winecfg
The Settings dialog box allows you to customize individual programs. Only the Windows compatible Running Mode settings are allowed.
Tags), some display settings, and DLL settings.
When you only need to set a program to use some specific windows built-in DLL, do not want other programs (including wine)
When using these native DLL (and its
It will cause problems when using these DLL programs). (The dll that comes with wine is called builtin, and the Native DLL in Windows is called Native) This option will become
Very useful. This method is used in DLL settings to prevent some nativedll that has potential threats to wine running from being called by wine,
Wine only calls built-in builtindll, instead of native DLL. copyright issues, unless set, as described above ). In this way, I just modified the executable configurations.
File. When I don't need it, I can change it back without damaging the entire wine. Before setting these items, make sure that the EXE file of a program has been added to the application tag
In the white box, and select the reversed color. It's not the default one. It's the EXE file you need to set .)

2.4windows
Try different Windows versions for different programs. This means that a game designed for XP may run better with the support of the 98 mode of wine. Before doing this, make sure that you have added the program to the application white box, and select it. The reversed color is displayed.

2.5 use ALSA driver
Some games require the OSS to run, but the OSS will no longer continue to develop.
(TRANSLATOR: We recommend that you use ALSA for an independent sound card. It is best to use OSS for integration)

2.6 do not always choose allow the window manager to control the windows (in winecfg)
Enable
Using this option sometimes causes problems when the game is running on the full screen. The current wine version 0.9.39 + has fixed the full screen issue for most games, but introduces a new problem:
If this option is not used, the keyboard cannot be entered in the game. This problem can be solved when a single X Server is used to run the game. (See "Advanced Settings ")

2.7 treat DLL with caution
Winecfg
You can replace builtin DLL with native DLL. The following DLL cannot be replaced. Kernel32.dll,
Gdi32.dll, user32.dll, and NTDLL. dll. Some nativedll may also make some programs unavailable. Do not overwrite wine's built-in
DLL. If native cannot be used, use builtin. Some ms dll files can be used only when they are licensed. If you do not have permission, do not use them.

3. Special configuration Materials

3.1 create a link to CD
Wine
It will create a link to the folder where you mounted the CD, but it will be better to create a link to the real device in/dev. I found that if this is not done, wine will establish
The/dev link recognizes CD as an E: disk, while the link to my mount directory is D: disk. I think this may cause problems in some programs installed on CD. Modify/dev/HDC to suit you
System ).

Code:
Ln-S/dev/HDC ~ /. Wine/dosdevices/D ":":

3.2 practical registry key value
Some settings cannot be set through winecfg, but can be set in the registry. There is an updated article in wine wiki.
Http://wiki.winehq.org/UsefulRegistryKeys
Two key values are very useful. One is the usedirecthw of the Alsa driver, which can solve the sound heap problem and the videomemorysize of direct3d, you should set it to the accurate Display memory of your video card. By default, wine is set to 64 MB.

3.3 wineprefixcreate
I do not translate this currently

3.4 install wine gecko ie Engine
Some programs depend on IE. However, installing ie seriously breaks the wine environment. Therefore, you can install wine gecko ie engine as a substitute.
1. Run the following command on the terminal:

Code:
Wine iw.e http://www.winehq.org

2. When the installation prompt is displayed, answer yes.
3. Open http://wiki.winehq.org/usefulregistrykeys and find the hkey_local_machinesection.
4. Add all the key values related to Internet Explorer to the Registry.
Run

Code:
Wine iw.e http://www.winehq.org

If it succeeds, the winehq homepage will appear.

3.5 Chinese support Settings
Save the following code as Zh. reg, and then the terminal executes Regedit Zh. reg. Copy simsun. TTC from the fonts in the Windows directory to/home/user/. Wine/drive_c/Windows/fonts.

code:
regedit4

[HKEY_LOCAL_MACHINE "software" Microsoft "Windows NT" CurrentVersion "fontsubstitutes]
" Arial "=" simsun "
"Arial ce, 238 "=" simsun "
" Arial Cyr, 204 "=" simsun "
" Arial Greek, 161 "=" simsun "
" Arial Tur, 162 "=" simsun "
" Courier New "=" simsun "
" Courier New ce, 238 "=" simsun "
" Courier New Cyr, 204 "=" simsun "
" Courier New Greek, 161 "=" simsun "
" Courier New Tur, 162 "=" simsun "
" fixedsys "=" simsun "
" helv "=" simsun "
" Helvetica "=" simsun "
" ms sans serif "=" simsun "
" Ms shell DLG "=" simsun "
" Ms shell DLG 2 "=" simsun "
" system "= "simsun"
"tahoma" = "simsun"
"times" = "simsun"
"Times New Roman ce, 238 "=" simsun "
" Times New Roman Cyr, 204 "=" simsun "
" Times New Roman Greek, 161 "=" simsun "
" Times New Roman Tur, 162 "=" simsun "
" TMS rmn "=" simsun "

4. Installation Materials

4.1 do not install programs in the CD directory.
(TRANSLATOR: Do not run the installer in the CD Mount directory)
In this case, the CD cannot be released when changing the CD. Run the following command to install the CD:

Code:
Wine/Media/cdrom0/setup.exe

4.2 "Wine eject" is required"
If the installation program requires you to change the CD, but the system says you cannot launch the CD, open a new terminal and enter:

Code:
Wine eject D:

4.3 install InstallShield bug Patches
Install http://support.installshield.com/kb/files/Q108322/IkernelUpdate.exe
This patch can solve some CD installation problems.

4.4 use uninstaller
Run the "uninstaller" command to uninstall the installed program. Do not use the uninstall shortcut created by the program in the menu. Sometimes they cannot work normally, but uninstaller can.

4.5 install the. MSI file
Some Windows Installation programs are installed Using MSI, so use the following command to install them:

Code:
Wine msiexec/I install. MSI

Or

Code:
Wine start install. MSI

4.6 do not install DirectX
Wine has its own DirectX library. installing Microsoft DirectX will damage wine's DirectX library and wine.
However, d3dx9 _ #. dll and d3dx10_33.dll can be copied and used from windows, which may be helpful when starting some games. To use these DLL files, you need Microsoft's authorization certificate.

5 General Materials

5.1 how to run a program using wine

Code:
Wine application.exe

5.2 run the CD to the installation directory of the program before running the program
CD to the installation directory of the program and then run the program.

5.3 turn off winedebug
In general, wine constantly generates some debug information (those "fixme ). The information is useless in many cases, especially if you can run a program normally. You can use the following command to avoid debugging information and save resources:

Code:
Winedebug =-All game.exe

5.4 do not use root or sudo to run wine
System files may be damaged.

5.5 other wine commands
Windows reboot Simulation
Wine control operation control panel
Wineserver will be automatically started with the wine command, but it can also be started through the terminal for different purposes.
Wineserver Parameters
1.-D # Set the display level of DEBUG in the terminal.
2.-H displays the wineserver Help File
3.-K kill the current wineserver. It is used when the program loses response and you want to end it.
4.-P keeps wineserver running. That is to say, even if the program exits, wineserver continues to run. This can be used when you need to run a continuous program to shorten the startup time of the program.
5. Use-W to keep wineserver running until the activated wineserver exits.

5.6 smooth running of wine
When
When the program runs slowly or the performance is fluctuating, you can increase the priority of the process. After starting the game, you can use the "renice" command to change the priority of the process.
The "renice" command can change the priority of the current process. The "nice" value indicates the priority level (high priority = low nice value, low priority = high nice value ). This command
The value of the program priority is set to any integer from-20 (highest priority) to 19 (lowest priority), and the default value is 0. After starting the game, you need to open another terminal and enter
To change the program priority:

Code:
Sudo renice-10-N game.exe

In
When running a game using wine, I do not recommend that you set the priority of the program to-20. It is best to start from-10. If the effect is not obvious, you can try to improve the game step by step (-
11,-12 ,......). You will find that the vast majority of games can achieve the best performance without having to have a higher priority than-10. Needless to say (I think), you can use alt-
Return to the desktop using the "renice" command.

Method 2
Use the GUI to set priority.
1. Run the game on a terminal and press Alt-tab to return to the desktop.
2. System> System Management> System Monitoring Program, switch to the process tag
3. Right-click a process and choose change priority.
4. Enter the password
5. Shut down the system monitoring program and use alt-tab to return to the game.

6. Third-party software

6.1 winw.ls
Winetools
Is a menu-style software that can install more than 90 common Windows programs. It can also help you set the basic directory of wine. No longer maintained
Winetools, which has not been upgraded for two years, but many users find it still useful. Winetools can do everything by itself through winecfg or terminal.

6.2wine-doors
Wine-doors is a software that helps you install many Windows programs, including a graphical interface of the game. It is still in the development stage, but an initial version that can be downloaded has been released. This software seems very promising.

6.3 cedega
Cedega is a technical branch of wine, which specifically targets games. Cedega includes a graphical interface for installing and running games, and added protection against copy protection software.
Supported (no need to use cracking to avoid CD) (TRANSLATOR: Wine's support for anti-copy is not very good ). Cedega is not free of charge. The minimum purchase price is 3 months and 3 USD per month. If one year is prepaid
You can enjoy a discount. Cedega used to be called winex. When wine is still the MIT software, rather than the current GPL, winex will
Because cedega does not belong to GPL, cedega no longer contributes to the development of wine code. In addition, many people no longer use cedega because cedega lacks support.
Play games in Linux.

6.4 crossover
Crossover
Technically, crossover is not a third-party product of wine, but a major financial supporter of wine. Crossover is
To run Microsoft
Office software is the target, but recently it began to add support for games. Crossover is based on an older and more stable wine version (TRANSLATOR: It seems to be 0.9.17),
Crossover is also upgraded along with wine. Crossover Standard Edition is priced at $39.95.

6.5 reactos
Zheng
Like crossover, reactos is also a supporter of wine. Based on the achievements of many wine, it is committed to building
Fully compatible operating system. After that, reactos is fully compatible with Windows drivers and software. This plan is still in the development stage, but it can provide installation CD,
Download livecd, qemu, and VMware images.

7. Advanced Settings

7.1 use the startup script (make sure the game works properly before use)
Again
Use separate X
Server, many games generally play their best performance. Wine can run normally without the Window Manager (gnome or KDE ).
Server. Before running the game, you can disable the running of the game, or kdm, to achieve greater performance improvement (only through the console ).
).
1. First, create a script under the terminal

Code:
Nano launcher. Sh (you can replace nano with vim)

2. Copy the following text to the terminal. If you do not have a NVIDIA graphics card, delete the NVIDIA Settings section and replace the path with the correct path of your game.

code:
#! /Bin/sh
# uncomment If launching from console session
# sudo/etc/init. d/gestation stop
# KDE use this instead
# sudo/etc/init. d/KDM stop

# launches a new X session on display 3. if you don't have an NVIDIA card
# Take out the "& NVIDIA-settings -- load-config-only" part
X: 3-AC & NVIDIA-settings -- load-config-only

# goto game Dir (modify as needed)
Cd "$ home /. wine/drive_c/program files/GAME/directory/"

# forces the system to have a break for 2 seconds, X doesn't launch instantly
sleep 2

# launches game (modify as needed)
display =: 3 winedebug =-all wine "C:/program files/GAME/directory/game.exe"

3. Save the file to your main folder (save Ctrl + O and exit Ctrl + X. If Vim is used, run ESC, Shift +:, save W, and exit Q)
4. Add executable attributes to your script.

Code:
Chmod + x ~ /Launcher. Sh

5. Run the script

Code:
Sh launcher. Sh

Or

Code:
./Launcher. Sh

6. After the game is over, return to the desktop with a CTRL-ALT-BACKSPACE

Method 2
If your game cannot run or you just want to squeeze out better game performance, follow the steps below to try to run the game when the X session is closed.
1. Cancel "sudo/etc/init. d/gestational disease stop Statement (delete #) and save it. If you are using Kde, cancel "sudo/etc/init. d/KDM stop ".
2. Close all programs and open the console by CTRL-ALT-F1
3. log on to the console and run the script. You will be asked to enter a password, and then the game will run in its own X session, without the possibility of being in the way of gmtr or KDM.
4. If the script shows that you do not have the permission to start X session, modify the script.
Modify the startup Statement of X server as follows

Code:
Sudo X: 3-AC & NVIDIA-settings -- load-config-only

Note: To avoid modifying the script, you can modify xwrapper. config to grant normal users the permission to start X. Use sudo Vim to open/etc/X11/xwrapper. config and change allowed_users = console to allowed_users = anybody.

5, after the end of the game, you can restart or CTRL-ALT-BACKSPACE back to the console, restart X and desktop:

Code:
Sudo/etc/init. d/gestation start

For KDE

Code:
Sudo/etc/init. d/KDM start

The desktop will appear soon. If not, enter

Code:
Startx

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.