Wine– an application that is a layer of compatibility with Windows API using libraries Windows to ensure the operability of applications developed for the OS of the family Microsoft Windows in a different environment, such as Ubuntu. Using Wine, you can install and run various programs as if you were using Windows.
Wine is actively developing. Not all applications are stable enough yet Wine, but Wine already used by several million users around the world.
The name of the program Wine (waɪn- between " wine" and " vine”, Rus. Wine) is a recursive acronym for the phrase " W ine I s N from an E mulator" - Russian. "Wine is not an emulator."

Installing Wine

Installing from a PPA

Due to the active development of Wine, the Ubuntu repositories usually contain a very old version. Therefore, it is recommended to install the latest version from the official Wine repository.

For latest wine and ubuntu 64 bits

sudo dpkg --add-architecture i386 sudo add-apt-repository ppa:wine/ wine-builds && sudo apt-get update sudo apt-get install --install-recommends winehq-devel

And it is generally not recommended to fill in and configure wine yourself. Working with wine is not very convenient. To install this or that program, you will have to climb a bunch of forums and blogs in order to understand which packages you need to install and which libraries to add. This is followed by a long process of troubleshooting, installing packages through winetricks and manually tweaking the registry and so on. This is all very difficult even for experienced users, not to mention beginners. Therefore, it is recommended to download the configured wine prefix from here: http://forum.ubuntu.ru/index.php?topic=199897.0

Setting

Before using Wine to run applications, you need to run the setup program, which will create a directory in your home directory ~/.wine with the necessary files. To do this, either select the main menu item Applications→Wine→Configure Wine, or run the command in the terminal:

winecfg

Associating files with wine programs

To transparently run files using wine programs, let's write a small script. Let's say we need to open CAD files with Compass and zwcad "ohm.

#!/bin/bash # Determine the file extension dd=$1 ; razr =` echo $(dd:(-3)) ;` ff =` echo $(dd/\"/\"Z:) ` ; ff=`echo' \"Z:"$ff \" ` ; # Depending on the extension, run the desired program case $razr in frw) env WINEPREFIX ="/home/" $USER "/.wine" wine start ` echo $ff ` & ;; cdw) env WINEPREFIX ="/home/" $USER "/.wine" wine start "C:\\Program Files\\ASCON\\KOMPAS-3D Viewer V9\\Bin\\kViewer.Exe"` echo $ff ` & ;; dwg) env WINEPREFIX ="/home/" $USER "/.wine" wine start ` echo $ff ` & ;; dxf) env WINEPREFIX ="/home/" $USER "/.wine" wine start "C:\\Program Files\\ZWCAD 2009 Eng\\ZWCAD.exe"` echo $ff ` & ;; # Here you can add more extensions and programs esac

Don't forget to make our script executable

chmod +x wine_cad.sh

and associate the drawings with the script in the file manager.

Launching Windows Applications

In order to run the application, you need to open the terminal and write in it:

wine path/ to application/ program.exe

If your application does not start or does not work correctly The wine website has a list of applications with a description, I recommend checking it out first. http://appdb.winehq.org/ - The site has a search field. If you are bad with English, then use the translator http://translate.google.com/ .

You can also open the folder containing the application you want to launch using the file manager, then right-click on the application and select the program to launch - Wine.

Applications running through Wine that work with Web pages require Gecko

Gecko is a free web page rendering engine for the browser when browsing the internet wine. If wine does not work with the Internet and you do not run a windows exe browser, then you do not need Gecko. Typically, when starting a web application, Wine automatically looks for Gecko first in /usr/share/wine/gecko. If Wine doesn't find a Gecko archive there, it automatically downloads it from the internet, but some applications don't like to wait for Gecko to load and freeze or crash. Gecko can be installed by running the command:

sudo apt-get install wine-gecko< версия>

where<версия>must be replaced with the version of the installed Wine.

Launch via discrete graphics card

To run through a discrete video card, you need to register in the terminal on free drivers (or write a script)

Vblank_mode=0 DRI_PRIME=1 wine filename.exe

vblank_mode=0 means vertical sync(Vsync). If there is no VSync in the game settings, then you need to erase vblank_mode=0

Save. Place it in the game folder. Make it executable in properties. Put a link to the script on the desktop. Run link instead of game file. For even greater performance, you need to install a closed proprietary driver.

Winetricks

Winetricks is a script for installing various components from Microsoft®, and some others. To get Winetricks in a terminal, type:

sudo apt-get install winetricks

Winetricks contains dozens of packages of various libraries for wine. For example, to install DirectX™, type:

Winetricks d3dx9

To view a list of all packages, type:

Winetricks?

Also, Winetricks has a simple GUI. Enter to run it.

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 !!!

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 handle this task so well that it is almost never necessary 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 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 Windows executable files.

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.

Not everyone has come to terms with the lack of Photoshop on Ubuntu, as well as a number of other useful programs or computer games available only for Windows. There is a way out for such people and it is called Wine. No, grief is not necessary to drink! Rather, learn how to install and configure Wine on Ubuntu, and then you can put on your system a piece of software that you miss a lot.

Installing Vine will enable you to use Windows applications on Linux.

Wine ("Wine") is a special application that allows you to run programs designed for Windows on Linux systems. It's a compatibility layer that uses Windows libraries and then replaces them with Linux system calls to make software designed for other systems work. To date, several million people have already used Vine and are quite satisfied. Developers release updates very often, so the program gets better year after year. Some craftsmen even manage to run modern games through it.

Wine cannot be called an emulator, like the same VirtualBox. The creators also tell us about this, “decoding” the abbreviation through itself: W ine i s n ot e mulator (in buzzwords this is called a recursive acronym). The virtual machine is not created, the application simply implements the Windows API.

Installation and removal

Removal

It is important to know how to uninstall Wine. It doesn't always work correctly. Some applications may terribly slow down or not start at all. In this case, reinstalling the emulator to a newer version should fix the problem.

However, you need to remove not only Vine itself from the computer, but also the folder in the home directory. The easiest way to do this is with the commands:

sudo apt-get purge wine
sudo apt-get autoremove
sudo apt-get clean
sudo apt-get install -f
rm -f ~/.wine
rm ~/.local/share/applications/wine/Programs
rm ~/.local/share/applications/wine*

This way we will get the remote directory along with the application itself.

Launching programs

You can run programs with Wine in a variety of ways. The first, easiest one is via Nautilus:

  1. We find the software in the folder.
  2. We click on it RMB.
  3. Select Wine as the program to run.

The second, traditional - through the terminal:

winehome/user/program.exe

Instead of home/user/program.exe, you must enter the path to the file that launches the application.

Where to get programs?

We got it right with Wayne. It remains now to understand where to find this or that software. You won't find anything in the Ubuntu Software Center, of course. Most users follow two paths:

  • looking for builds on websites and forums;
  • use special shells.

Shells are applications that give Wine a graphical interface and allow you to load normal builds with all the necessary packages. Most Popular:

  • It contains not only games, but also many programs that are constantly being brought to the ideal.
  • Paid and, as a result, a better shell.
  • wine wizard. A new shell that has a slightly different approach. Here are collected all the successful solutions of different users, you just have to look for them.

Well, forums and sites offer a lot of different assemblies and instructions for installing games, office applications, and anything else. If you set a goal and spend a certain amount of time, you can put almost any game on Ubuntu. For example, there is a video where a user demonstrates the installed Fallout 4, which for many Linux users seems like a fantasy and a pipe dream.

Now you are aware that installing Wine on Ubuntu allows you to greatly smooth out the roughness of this system and once again annoy greedy developers. You also know how to uninstall Wine, configure it, and update it. It is quite possible that over time you yourself will learn to install the necessary programs without outside help.

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.