Installing Wine, winetricks, DirectX and programs required for games. Setting up and installing Wine on Ubuntu Winetricks - advanced settings, components and programs

The article is devoted to Wine and all aspects of its use. The network is very
a lot of information, there are various setup guides and much more. I
I will try to combine everything so that anyone can achieve
maximum success, within their abilities and of course the possibility
programs. So, let's begin.

Wine is a separate implementation of the Windows API, not an emulator like most
think. Not once repeated, but here it will be appropriate. This is what makes the project
unique and interesting for users of various systems, opens up various
ways to implement your ideas. The uniqueness lies in the fact that with
this program can run Windows applications in Ubuntu and other
Linux systems, as well as FreeBSD and Mac OS X. The truth is there
their "pitfalls". Some people think it will be easy to move from one
system to another, in this case we are looking at Windows and Linux.

The misconception is that people think they can run from
under Wine, various software to which they are accustomed and it is convenient for them to work in it.
No matter how you twist it, nothing just happens. To make our favorite software work under
Wine needs to sweat, re-read a bunch of manuals and weigh this volume
information. Of course, not quite software will have to “puff up”, but you need to be ready for anything. The Wine project is developing very quickly, but before stable work it
very far. But I think that in the near future all the main software, as well as games
will work on it stably.

Installing Wine

The first question of a person who has just switched to Linux (in our case
Ubuntu): "How will I run programs from Windows?". He starts searching for this
theme and naturally stumbles upon Wine.
The second question is: "How to put it?". There are two ways: Install from
official repositories or compile yourself from source. We'll consider
both options.

Option 1: Install from a repository.

Everything is very simple here. Go to Applications // Accessories // Terminal:

sudo add-apt-repository ppa:ubuntu-wine/ppa
sudo apt-get update
sudo apt-get install wine1.3

Waiting for installation to complete...
All! Wine is installed and you can try to install games and programs.

Option 2: Compiling from source.

1.Download the sources from the official site, they are there. In my case
this is Wine 1.3.11 (http://sourceforge.net/projects/wine/files/Source/wine-1.3.11.tar.bz2/download).

Change to the directory where the source archive was unpacked:

cd wine-1.3.11/

Before compiling, you need to enable OpenGL support. If we don't
applications that require OpenGL will not work. In terminal:

gedittools/wineinstall

We find the line starting with CONFARGS=, and then enter the necessary
build options. In our case, the line will look like this:

CONFARGS="--with-opengl --disable-debug --disable-trace"

We get the dependencies:

sudo apt-get install auto-apt checkinstall
sudo auto-apt -y run ./configure

We collect:

Install via package creation instead of make install

sudo checkinstall

All. We are waiting for the installation to finish.

There is also an intermediate option, for Jedi on debian-based distributions. Briefly:

apt-get source wine1.3
sudo apt-get build-dep

Now the most interesting thing: download the required version of wine from the official site, unpack it, and copy the debian directory there from the source directory of the original wine1.3 package. Doing

And we have a *.deb package for ubunta/debian with all the necessary patches for the distribution, almost like from the official repository, but only a new version. In addition, it can then be safely removed also via apt-get.
Consider the pros and cons of each option.

Option 1.
Pros:
1. Everything has already been collected for us and there is no need to puff up, everything is already ready for use.

Minuses:
1. We will not be able to apply a patch, for example, to improve the performance of some kind of toy.
2. Not stable work on some video cards.

Option 2.
Pros:
1. Ability to apply patches to improve performance
2. Stable operation with unstable video card drivers.

Minuses:
1. There is no menu in Applications, which is not convenient. You have to do everything from the console,
go out to wine settings For example.
2. The installation process is too long, depending on the power of your computer.
1. There is no menu in Applications, which is not convenient. You have to do everything from the console, go to the Wine settings for example.

You can add it yourself through System - Options - Main Menu

I prefer the second option. Wine installed this way works
better than the one installed from the repositories. But this is just my little IMHO.

Installing programs and games

First we go to appdb.winehq.org From above, in the search engine we drive
the name of the game or program and see what is written there. They usually describe
tests on various systems, recommendations for stable operation and much more.

If the program works without problems, then we install it with a pure soul
with a simple click. If this is some kind of serious game or program, and without
shamanism with a tambourine is indispensable - so you need to create a separate prefix * for
our dances. * All Vine files are stored in a prefix, or also called a bottle (similar to wine). There, inside this bottle, there are all the files of the C drive, the registry, individual settings, and so on.

There can be any number of such bottles.

It's just that there may be some software that behaves very capriciously under Vine and it needs some kind of crutches that will interfere normal operation other wine applications. Then we just put this software in a separate bottle (prefix) and any settings will not affect other programs.

When a wine is started for the first time without a prefix specified, ~/.wine is used. If the prefix does not exist, Vine will create it and fill it with default content, create and fill the C:\windows, C:\Program Files, C:\users directories with files. Plus, a clean registry will be created.
Go to our home directory and create a new directory. For example.wine2.
Next, go to the terminal and enter:

WINEPREFIX="/home/username/.wine2/" winecfg

All. A separate prefix has been created. Various registry configurations and the programs themselves are stored there.
We also install the program through the console.

WINEPREFIX="/home/username/.wine2/" wine /media/DVD/setup.exe

There is an installation process and most importantly in a separate prefix.
Then we run the already installed program, also from the console and look at the output.

There may be errors in the output, indicating that there are no necessary components and libraries. IN
winetricks will help us install the missing components (see below)

What does it give? This gives stable operation of applications in its prefix if
a lot of programs will work in one prefix, sooner or later it will become clogged
which will crash other programs. Therefore, you need to use separate
prefixes, if you do not want to configure everything many times.

Winetricks

Winetricks will help us with the correct prefix setting.
Winetricks is a script that installs various components that
required for applications to work, such as DirectX, Vcredist, and more.
How does this script work? It downloads libraries and components from
Microsoft resources. Exactly so, and not in any other way. Why this script
needed? This greatly simplifies working with Wine. Without the script, we would climb ourselves and
we were looking for the necessary components, and here everything is already done, you just need to check the box
and click "Install" Also, this script helps to edit the registry,
enter different keys there. And besides that, winetricks has a lot of options.
and functions.

To familiarize yourself with it, simply enter in the terminal winetricks

Registry editing

In the terminal enter:

We are on the register. We do not need to edit anything, we will only add.

Go to HKEY_CURRENT_USER/Software/Wine/Direct3D.

If there is no Direct3D directory, then do not despair. I am writing this for the reader to understand.
somewhere you need to edit or add.

In terminal:

Winetricks ddr=opengl orm=fbo glsl=disabled videomemorysize=1024
(1024 change to your own)

All these parameters appear in the registry. You can see it in the folder above.

What does it give? It improves gaming performance, speed and overall gaming
work better from this, but this is only for games.

PlayOnLinux

There is also PlayOnLinux. This is a standalone program that uses Wine,
but there everything is more automated and configured. The program will automatically download the required
Wine will install the components and create a separate prefix. But that doesn't mean that
everything will work perfectly. It may not work at all. So I give mine
preference for regular Wine, manual setting and the work of their own brain, and not
automated program.

Pros:
Everything is automated and we don't really need to do anything.
It is possible to keep multiple versions of Wine and apply them for different prefixes.
The program itself creates prefixes.

Minuses:
Everything that the program does, installs and downloads is impossible to predict.
Everything that the program does can be done by yourself, with pens, this is + to human knowledge.
The Robot program will never compare to the human brain.

Mounting CD/DVD images

Windows has a utility called Daemon-Tools for this. It's very comfortable
and irreplaceable utility. A person has a question: Is there an analogue of this
miracle utility? Answer: There are much better Windows Utilities. It's called
cdemu. To install it, we need to enter only three commands:

sudo add-apt-repository ppa:cdemu/ppa
sudo apt-get update
sudo apt-get install cdemu-daemon cdemu-client gcdemu

We add an applet to the panel, indicate the path to the image and enjoy life. Not what
there will be no problems and Wine will detect the image perfectly. If the applet is not found, do not rush to reboot.
In the terminal, enter the commands:

sudo service cdemu-daemon start

If the service does not start at system startup ("The daemon is configured not to start at system startup"), you can fix it like this:

sudo update-rc.d cdemu-daemon enable

Running games on a separate X server

This could fill a whole book, but I settled on one method that I always use:

Go to the virtual terminal:

Ctrl+Alt+F1
login: ******
password: ******

Manually start a new copy of the X server:

Xinit -- :2
wine path/folder/c/game/game.exe

The increase from this is not big, but for me personally it is enough. I repeat once again:
there are many ways to run in a separate x-server and each person is free to choose for himself.

Conclusion

All these tips, the basics that every person who wants to know should know
use Wine to achieve your goals. Everything else is in your hands. If
you want to achieve your goal no matter what, and hope is already leaving, not
never despair, for the solution may be right in front of you. to sit
on two chairs is possible, but this requires desire and nerves of steel. Wish
- a thousand possibilities, not desire - a thousand reasons.

This material was written for the "First competition of Russian-language articles for OS
Ubuntu" (konkurs.ubuntu.ru)
Article author Vladimir Kacharmin aka rootboot
Contacts: Skype root.boot2, email [email protected]

Wine is a free and open source implementation of the Windows API. Wine is not an operating system or computer emulator, as can be described, for example, virtualization software (VirtualBox, VmWare etc.), which emphasizes the decoding of its name " Wine Is Not Emulator". Wine was created to reduce the degree of dependence on the activities and position of the corporation Microsoft, expanding scope free operating systems through the possibility launch programs for Windows.

Wine is not an emulator

In fact, Wine is a set of libraries and software tools that allows run windows programs and similar to what she uses herself operating system by Microsoft. Part the Wine software distribution also includes programs for configuring it (), a registry editor, a package of scripts, file manager, Notepad, etc. Quantity programs for Windows which are already run with Wine quite large and constantly growing. At http://appdb.winehq.org there is a specialized database with notes on the compatibility of certain programs with Wine. Among the fully compatible with Wine programs many office and multimedia programs, programs for enterprises and organizations, "1C" including programs for graphics processing (including some versions Adobe Photoshop and so on.). The number of supported and initially compatible with wine games.

Since emulation of any devices and during operation Wine does not occur, the operating speed is compatible with Wine programs when using it, it is usually not lower than when working directly in Windows (and often higher).

Based on, or using components, Wine at different times such projects as Cedega(focused on launch games, Firstly), crossover(focused on application launch) and so on.

Installing Wine

Wine software package most often included in modern Linux distributions(Ubuntu, Mint, Debian, openSUSE, etc.), and for its search and installations You will most likely need to contact management software your distribution.

apt-get install wine In order to install WINE, execute in console as administrator, for Debian, Ubuntu, Mint, etc. zypper install wine wine-gecko For SUSE and openSUSE Linux.

Setting up Wine

For start Wine setup programs, call in the console, or in the command shortcut dialog, winecfg (use " WINEPREFIX"). Winecfg customizes the appearance of Windows programs for example, it makes it possible to change the version of a set of libraries Windows (2000, XP, 2003, Vista, ...) and so on.

Winetricks - additional settings, components and programs

Winetricks is a set of scripts written by developers Wine and the community, to facilitate changes to some of the hidden Wine settings, installations some additional system libraries ( DirectX etc.) and popular Windows programs, including Internet Explorer (IE), several demos games and so on.. Winetricks is usually included with the Wine distribution. To launch the main dialog box Winetricks execute in console, or the command shortcut dialog (key combination " Alt+F2"), command " winetricks". You can also use commands like winetricks directx9 in console where "directx9"- name of the installed component. To view a list of component categories offered Winetricks to install, you can call winetricks list command, and for listing the contents of the categories themselves - winetricks apps list , where "apps"- the name of the required category.

Running Windows Programs in Wine

Way running programs in Wine typical for working with any file, be it an image, a text file, or an executable exe file in our case: you can just run executable Windows file(*.exe) from his file manager(double click, for example), or execute command in console wine ~/Downloads/program.exe . You also can run Windows programs through inner paths Wine, if they are located in directories mounted as system drives when starting the necessary profile ("prefix") Wine(be it standard "~/.wine/drive_c", or any other folders, customized You). In this case, the DOS address format is used. programs wine C:\\Program\ Files\\programm.exe .

A backslash "\" is added before special characters such as the same backslash or space.

Installing Windows programs in Wine

For Windows program installation, respectively, you will need run its installer: wine setup.exe Next, you will need to go through the standard procedure Windows software installations, which most often consists of repeatedly clicking the "Next" button. One of the most interesting features Wine lies in the possibility of using profiles, or the so-called " prefixes", for installing programs - independent copies of system library sets, Windows programs and settings. Standard Wine prefix, i.e. the folder where the default profile is written is ".wine" - a hidden folder inside the user's home directory. To use a separate "prefix", you need to create a new folder for it ( to reset the profile - delete its contents) and use global variable export WINEPREFIX(possible as part of a team launching a Windows program, including for installers). For example WINEPREFIX="/home/user/.wine-programm" wine setup.exe . For installed programs Wine creates shortcuts in the local user (~/.local/share/applications/) menu desktop (Gnome, KDE, XFCE etc.) using the necessary prefixes.

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 command line to view the output, which contains 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 handle this task so well that it is almost never necessary to change the theme. The worst thing that can await you if you do not use this tab is the design in Windows style 98.

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 certain applications, as well as select the 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 executable files Windows.

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 application.

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.

The previous guide is outdated and does not cover many features of wine. Here I will describe the initial setup of wine, so that it would be clear to everyone. It needs libraries to work correctly, winetricks will help us with this. But first, let's install the latest version of wine:

sudo apt-get install wine

There is also a repository, with more frequent updates, but often unstable:

sudo apt-add-repository ppa:ubuntu-wine/ ppa

Winetricks

Winetricks- a script that allows you to install additional Windows components in Wine in a few simple steps.

The version of Winetricks installed from the repositories is often out of date. To update run:

wget http:// www.kegel.com/ wine/ winetricks && chmod a+rwx winetricks && sudo mv winetricks / usr/ local/ bin

If Winetricks gives a hash sum error, try this command again, or run the program manually using wine ~/.wine/.chache/winetricks/program_dir/program

You can use Winetricks both in GUI mode and in console mode. For the GUI, press Alt + F2 and type winetricks. For console mode, use winetricks program_name, for example:

winetricks directx9 dotnet11

But do not rush with the setting! To do this, you need to create a prefix. Prefix - a directory containing the emulation of the C: drive with all windows programs and libraries. Theoretically, you can install programs even in / mnt, but in practice this most often leads to failures. If you have a 32 bit system, just type winecfg. If you have a 64-bit system, then I strongly recommend creating a 32-bit prefix, for this, enter:

WINEARCH=win32 WINEPREFIX=~/.wine winecfg

For example, . NET Framework is intended (in winetricks) only for 32-bit systems.

If you see a window prompting you to install mono and gekko while running winecfg, agree and wait. Dig into the Wine settings and start filling in.

Filling with wine

On the Internet, you will find many guides to filling wine programs, each of them may require combinations of libraries that are incompatible with the other. But you can create different prefixes for different programs, for this:

WINEARCH =win32 WINEPREFIX =~/ prefix_name winecfg

Starting the program: WINEPREFIX=~/prefix_name C:/path/to/program

In the example above, C:/ is treated as the root of the folder, i.e. wine C:/notepad.exe is equivalent to ~/.wine/notepad.exe

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

mob_info