1. Introduction

Many programs work under WINE without any additional settings at all. Unfortunately, this is not always the case. In addition, programs are constantly updated and the list of running applications is constantly changing. Therefore, it would be a good idea to set up WINE to work with potentially problematic programs.

There are two main utilities for configuration - winecfg and winetricks. In this guide, we'll take a look at the first one. In most cases, however, the capabilities of winecfg are enough to make the program work.

winecfg is a graphical utility. Different distributions and desktop environments work with WINE and WINE applications in different ways, so it's easiest to run winecfg in a terminal on any distribution.

After starting the program, you will see a simple window with seven or eight tabs, depending on the version of WINE. The eighth tab "Staging" appears only when using intermediate versions of WINE.

2. Libraries

The "Libraries" tab is probably the most important in winecfg. It allows you to control how WINE works with Windows libraries. This is especially important because some applications are not compatible with certain versions of the libraries, or require certain non-standard libraries. The WINE code has also been modified to address these issues. Since WINE is not Windows, it may not always be able to use the same native version of a Windows library before that library is adapted to work with WINE.

The first item in the input is the "New override" dropdown. It lets you choose from an incredibly long list of Windows libraries, or type in your own. After that, you click the "Add" button to add it to the list.

After clicking "Add" the library will appear in the box below called "Existing overrides.". This field contains a list of overridden libraries added to WINE. By default, the new (native, builtin) override will be as follows. This means that WINE will first try to use the native Windows version of the library. If the attempt fails, WINE will revert to its built-in version. These options can be changed. To do this, select the override you want, then click "Edit" next to the "Existing overrides" field.

By clicking on the "Edit" button, we will see a window that allows us to edit the override. There are five available options to choose from, most of which are various combinations of "Native" and "Builtin." The last available option is "Disable". Which option to choose depends on the type of errors you encounter. Finding the right combination of options can be quite difficult, especially if the program is not documented in the WINE Appdb (https://appdb.winehq.org). You can try running the program in WINE from the command line to see the output, which can provide a lot of useful information.

If you need to remove an override, simply highlight it in the "Existing overrides" box and click the "Remove" button. From time to time you have to do this when updating the program.

3. Graphics

The "Graphics" tab is something you probably won't use very often. If you're having problems with your screen resolution, you can adjust the dpi, and if your window manager isn't behaving properly, you can disable its control over WINE windows.

More often you will use the "Emulate a virtual desktop" option of the "Graphics" tab. This option allows you to have the WINE application run in a window that behaves like a virtual desktop. Remember that this is not a virtual machine. It simply makes applications run in WINE in a window.

This option probably looks rather strange, but there are at least a couple of cases where it may become necessary.

Very often in WINE programs refuse to run in windowed mode. Usually this problem occurs in games where some strange bug appears only in windowed mode. A workaround to run such games in windowed mode is to use the "Emulate virtual desktop" option.

The other case is more problematic. Sometimes an app tries to change the screen resolution and crashes in the process. Again, this happens most often with games, especially older ones. A crash can eventually result in a black screen, incorrect resolution, or an X server hang. In any case, this is a problem. To prevent it, run the program with the "Emulate a virtual desktop" option. It may not prevent the program from crashing, but it should prevent problems with the rest of the system. This is a useful debugging methodology.

4. Desktop integration

You probably never used this tab. The "Desktop Integration" tab allows you to change the appearance of applications running in WINE. However, most graphical shells and window managers do this very well, and as a result, there is almost never a need to change the theme. The worst thing that can happen if you don't use this tab is the Windows 98 look and feel.

5. Disks

Usually WINE does a good job of detecting disks. If the drive is not detected, or you need to add a physical or virtual drive to the system, the "Drives" tab serves for this.

When adding a physical drive, you can use the "Autodetect" button to have WINE try to detect the new drive. If that didn't work, or if you are adding a virtual drive, you can click "Add..." and set the drive letter for the new drive. Next, select the drive in the "Drive configuration" window and change the path to the device in the "Path" field.

This tab is very useful when running games that span multiple discs or games that require a disc in the drive to run. It can also help if you have a designated Windows drive or partition that contains games or other programs.

6. Audio

7. Staging

You will only have the "Staging" tab if you are installing intermediate releases or patches. It is simply a set of checkboxes that allow you to enable or disable various features provided by patches. The main feature is the ability to activate support for CSMT or Gallium Nine, depending on the installed patches. CSMT is available for all video cards and drivers, and allows you to significantly increase performance in many programs and games. Gallium Nine is only available to Mesa users and could potentially get a huge performance boost. However, these two options cannot be used at the same time. Other options may also provide some performance gains.

8. Settings for specific programs

Since most of the WINE settings serve to fix problems associated with various applications, it makes sense to create specific configurations for different programs. The "Application" tab allows you to create configurations that WINE selects when running specific applications, as well as select an emulated version of Windows for compatibility.

To create a preset set of settings, click "Add application...". You will see a window that allows you to select Windows executables.

winecfg will change settings depending on which application is selected in the tab. The default settings are selected by default. These are general settings that will apply to all applications, with the exception of a specific set of settings intended for a particular application. By selecting an application in the tab "", you will see the settings for this application in all tabs. Changes you make in other tabs apply only to the selected app.

9. Conclusion

winecfg is a small but powerful utility that allows you to customize WINE to suit your needs. Once you become familiar with it, and learn how to use it correctly, you will be able to create working configurations with many of the applications that run with WINE. Also, using winecfg along with winetricks will give you near-native performance for many programs.

Wine (WINE Is Not an Emulator) is a special program, a compatibility layer, for running Win32 applications on UNIX-like systems. Simply put, this thing allows you to run Windows programs and games in your cozy Linux :).
The program is being actively developed, but so far, unfortunately, not all applications work correctly in it (and some do not work at all). So far, it’s also sad with games - there is no full support for DirectX 10 and 11, only 9 and younger. (Support for DirectX 10 is being actively improved in the latest test builds). But nevertheless, there are a lot of games on DirectX 9. In this article, we will install and configure Wine, and install the PlayOnLinux application, which is very useful for gaming. The installation will depend on your distribution, but the program setup itself is exactly the same in the vast majority of distributions. There are two branches of Wine - stable and testing. In most cases, it is recommended to use the test one, as the program is actively developing and improving. For now, let's consider installing the stable version (the examples are for the command line, but you can use graphical utilities like Ubuntu Software Center or Yast2 in OpenSUSE):

For Debian/Ubuntu/Mint:

sudo apt-get install wine winetricks

For OpenSUSE:

sudo zypper ar -r http://download.opensuse.org/repositories/Emulators:/Wine/openSUSE_13.1/Emulators:Wine.repo
sudo zypper in wine

sudo yum install wine
cd /tmp
wget http://www.kegel.com/wine/winetricks
chmod +x winetricks

Note. If you have a 64-bit system, then for the correct operation of 32-bit programs (and most games are like that), you need to configure Wine for a 32-bit prefix. For this we drive:

WINEARCH=win32 WINEPREFIX=~/.wine winecfg

The settings window will open. You can leave everything as it is.

Now we need to install a set of system libraries for our Windows applications to work. In the program menu, find and run Winetricks(or from the terminal with the command winetricks). In the first window choose ---Select the default wineprefix--- earn OK. In the second ---install a Windows DLL or component---OK


Remember:
It will be necessary to mark with dots, as in the list. It is better to install not all at once, but several pieces at a time. I will separate them for convenience. Do not go too far when installing, you need to agree to license agreements and other things. Error windows will pop up, click OK. Let's start.

directx9 d3dx9 d3dx9_26 d3dx9_28 d3dx9_31 d3dx9_35 d3dx9_36 d3dx9_42 d3dx9_43 d3dx10 d3dx11_42 d3dx11_43

dotnet20

dotnet30(errors will appear and a window will open in the file manager and in the browser, download from the second link and move it to this file manager window. We type in the console winetricks and select dontnet30 again. Before doing this, you need to check the Wine Setup so that the version is Windows XP or Vista.

dxdiagn, gecko120, gfw, mfc40, mfc42, msasn1, msxml6, gdiplus , physx, quartz

vb5run, vb6run, vcrun2003, vcrun2005, vcrun2008, vcrun6, vcrun6sp6

wmp10, wsh56vb, wsh57, xact, xact_jun2010, xinput

Install fonts. Choose Install a Font and indicate

corefonts , fontfix

Registry setting

We open Change Settings and celebrate

1. DirectDrawRender(ddr) -- opengl
2. Multisampling Direct3D -- enabled
3.OffscreenRenderingMode(orm) -- fbo
4. PixelShaderMode(psm) -- enabled
5. Render TargetLockMode(rtlm) -- auto
6. UseGLSL(glsl) -- enabled (default) (It is recommended to leave disabled for Nvidia graphics cards. This can significantly increase the performance of some games).
7.VertexShaders(vsm)--hardware
8. VideoMemorySize 1024 (select the RAM value of your video card)
9. MouseWarpOverride(mwo) -- enabled (force)
We confirm our changes - OK.

That's actually all. Now some notes on installing software and games. Firstly, in no case do not install additional software that the program offers (all sorts of directixes, visual c ++, and so on). Check carefully and, if necessary, uncheck the boxes. Secondly, at the end of the installation, uncheck "Run the program".

Now for the test version. There is a special repository for Ubuntu/Mint. To connect it and install a test version of Wine, enter in the terminal:

sudo add-apt-repository ppa:ubuntu-wine/ppa
sudo apt-get update
sudo apt install wine 1.7 winetricks

In some distributions (eg Debian), to install a test version, it must be built from source. But this is already beyond the scope of this article. Or you can install wine-staging , which is also a test but has a few extra features.

P.S. for those who like to see once than read a hundred times - a small video tutorial on installing a test version of Wine on Ubuntu:

For the correct operation of most games, it is necessary to adjust the registry of our pseudo Windows. To do this, we will use the Winetricks utility, which was installed with Wine.
Do the following manipulations: Applications->Wine->Winetricks. In the opened window check: Select the default wineprefix . OK

In the next window, mark: Change Settings. OK

You will have access to the main settings of your Ubuntu-Wine-Windows bundle.

Check the following options here:
1. DirectDrawRender(ddr) opengl
2. Direct3D Multisampling enabled
3. OffscreenRenderingMode(orm) fbo
4. PixelShaderMode(psm) enabled
5. Render TargetLockMode(rtlm) auto
6. UseGLSL(glsl) enabled (default)
7. VertexShaders(vsm) hardware
8. VideoMemorySize 1024 (select the RAM value of your video card)
9. MouseWarpOverride(mwo) enabled (force)
We confirm our changes - OK.
All registry settings of our system are stored in text files (system.reg; user.reg; userdef.reg) located at the address - Home\Username\.Wine and they can be edited in any text editor (try this in real Windows?! ). For editing, you can also use the more familiar Windows method - the registry editor: type wine regedit OK in the terminal

the editing program will start

As you can see, everything we did in Winetricks is reflected in the registry settings.

Recently, Wine has changed for the better, Mono has been improved and now it works well.

I hope you install Wine x64 without instructions, through Add or Remove Programs.

Switching wine from 64 to 32

rm -fr ~/.wine env WINEARCH=win32 wineboot

After installation, you need to find the Wine Settings icon in the application or run the command in the console

Wine will offer to install the Mono package - we agree (OK), after the Gecko x64 and Gecko x32 package - we agree (OK), the Wine settings window will open, you can close it - until it is needed. You can configure everything through the graphical interface, but it takes a long time and if there is a failure, you won’t understand where it happened. Install via console (terminal).
Install fonts.

winetricks corefonts

The first long one command (copied, pasted into the console, press Enter). It will download the necessary libraries, installers will appear, we agree with the license agreements and install. If a failure occurs (error mfc40) or the installation hangs in the console, press Ctrl + C (stop the process), execute this command again. Everything should be installed (checked). The speed of installation depends on your Internet connection speed.

winetricks

Second team

winetricks dxdiagn gdiplus gfw mfc40 mfc42 msxml6 quartz

Third

winetricks vb5run vb6run vcrun2005 vcrun2008 vcrun2010 vcrun2012 vcrun2013 vcrun2015 vcrun6 vcrun6sp6

Fourth

winetricks wsh57 wsh56vb xact xact_jun2010 xinput

Next, select change settings and set

ddr=opengl fontfix glsl=enabled multisampling=enabled mwo=enabled nocrashdialog orm=fbo psm=0 psm=1 psm=2 psm=3 rtlm=auto strictdrawordering=desabled videomemorysize= than 2048, then mark it then correct it in the registry) vsm=0 vsm=1 vsm=2 vsm=3

Choose to run winecfg

Set the Wine version (from the drop-down list) to Windows-7 or higher.
On the tab - Libraries - in the existing values ​​\u200b\u200bwe are looking for - dinput - select and click.
Edit, in the drop-down menu we set - built-in, then third-party, repeat the action and with -dinput8- eliminates mouse problems in games.

Who has problems with sound, you can change the parameter - dsound - to built-in.

Wine profix

WINEARCH=win32 WINEPREFIX=~/winecfg prefix_name
WINEPREFIX=~/prefix_name C:/path/to/program

Filling Wine

Added instructions for installation and filling
Let's start stuffing our, not yet experienced, in terms of omnivorous Wine. That is, we will install applications without which not one self-respecting game will start. For example, DirectX, Visual C ++, MS.NET, PhysX, Windows Media Player, in general, I will list everything you need (or maybe not!?).
We open " Applications->Wine->Winetricks"(further in the windows we put dots as shown):

Click OK, the following window appears:


Click OK again, a window opens with a choice of installed components and DLL, check the boxes for the items that I indicated:
d3dx9, d3dx9_26, d3dx9_28, d3dx9_31, d3dx9_35, d3dx9_36, d3dx9_42, d3dx10, d3dx11_42, d3dx11_43, d3dxof, devenum, dinput8, dirac, directmusic, directplay, directx9, dmsynth, dotnet11, dotnet20, dotnet30, dxdiagn, gecko110, gecko120, gfw, mfc40, mfc42, msasn1, msxml6, physx, quartz, vcrun2003, vcrun2005, vcrun2008, vcrun6, vcrun6sp6, wmp10, wsh56vb, wsh57, xact, xact_jun2010, xinput, adobeair.
OK. We are gaining patience, waiting for all this to be installed, sometimes you will need to confirm the license agreement, so don't go far :)
Better, I would recommend you not to install everything at once, but two or three components - in this case, if some kind of failure occurs (God forbid), you will at least know on which component it happened.

For extreme and especially lazy people, there is another way:

!!!I advise you, before you start experimenting with games, create a backup copy of the folder.Wine: " Go->Home Folder->Ctrl+H"and copy the entire .Wine folder to another location. It does not weigh much (about 1GB), with installed components, and in case your working .Wine crashes, you can replace it !!!