Installing and configuring wine. Installing Wine Linux Mint

Installing and configuring wine.  Installing Wine Linux Mint
Installing and configuring wine. Installing Wine Linux Mint

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 configure WINE to work with potentially problematic programs.

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

winecfg is a graphical utility. Different distributions and desktop environments handle WINE and WINE applications differently, so the easiest way to run winecfg on any distribution is in a terminal.

After launching 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 incompatible with certain versions of 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 use the same native version of the Windows library before that library is adapted to work with WINE.

The first element in the contribution is the "New override" drop-down list. It allows you to select a Windows library from an incredibly long list, or enter your own. After that, you click the "Add" button to add to the list.

After clicking "Add", the library will appear in the field below called "Existing overrides.". This field contains a list of overridden libraries added to WINE. By default, the new override (native, builtin) 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, highlight the override you need, then click "Edit" next to the "Existing overrides" field.

By clicking the "Edit" button, we will see a window that allows you to edit the override. Here you can choose from five available options, most of which are various combinations of "Native" and "Builtin." The last available option is "Disable". Which option you choose depends on the type of errors you are encountering. 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 view the output, which can contain quite a bit of useful information.

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

3. Graphics

You probably won't use the "Graphics" tab very often. If you have problems with screen resolution, you can adjust the dpi, and if your window manager is misbehaving, you can disable its control over WINE windows.

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

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

Very often, programs in WINE refuse to run in windowed mode. This problem usually occurs in games where some strange bug only appears in windowed mode. A workaround for running 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 could ultimately result in a black screen, the wrong resolution being set, or the X server hanging. Either way, it's a problem. To prevent this, 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've 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 already cope with this task perfectly, as a result of which there is almost never a need to change the theme. The worst thing that can await you if you don't use this tab is a Windows 98-style design.

5. Discs

WINE usually does a good job of detecting drives. If the drive is not detected, or you need to add a physical or virtual drive to the system, use the “Drives” tab for this.

When adding a physical drive, you can use the "Autodetect" button to have WINE try to detect the new drive. If this doesn't work, or you are adding a virtual drive, you can click "Add..." and set a 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 can significantly increase performance in many programs and games. Gallium Nine is only available to Mesa users and can potentially see huge performance gains. However, these two options cannot be used simultaneously. Other options may also provide some performance gains.

8. Settings for specific programs

Since most WINE settings are intended to troubleshoot problems associated with various applications, it makes sense to create specific configurations for different programs. The Application tab allows you to create configurations that are selected when certain applications are launched in WINE, as well as select the version of Windows to be emulated for compatibility.

To create a specified 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. By default, the default settings are selected. These are general settings that will apply to all applications, with the exception of a specific set of settings intended for a specific application. By selecting an application in the "" tab, you will see the settings of 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 applications that run using WINE. Additionally, using winecfg with winetricks, you can achieve near-native performance levels for many programs.

Wine– an application that is a compatibility layer with Windows API, using libraries Windows to ensure the functionality of applications developed for the OS family Microsoft Windows in another environment, for example, in Ubuntu. Using Wine, you can install and run various programs as if you were using Windows.
Wine is actively developing. Not all applications yet work stably enough in Wine, however Wine already used by several million users around the world.
The name of the program Wine (waɪn- between " Wayne" And " vine", rus. Wine) is a recursive acronym for the phrase " W ine I s N ot an E mulator" - Russian. "Wine is not an emulator."

Installing Wine

Installation from PPA

Due to the fact that Wine is actively developed, 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 versions of wine and ubuntu 64 bit

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

In general, it is not recommended to fill out and configure wine yourself. Working with wine is not very convenient. To install this or that program, you will have to crawl through a bunch of forums and blogs to understand which packages need to be installed and which libraries to add. Then there is a long process of solving problems, installing packages through winetricks and manually tuning 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

Settings

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 files necessary for work. 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 launch files using wine programs, let's write a small script. Let's say we need to open CAD files with Compass and zwcad.

#!/bin/bash # Determine the file extension dd = $1 ; razr =` echo $(dd:(-3)) ;` ff =` echo $(dd/\"/\"Z:) ` ; ff =` echo " \"Z:"$ff \" ` ; # Depending on the extension, launch the desired program case $razr in frw) env WINEPREFIX ="/home/" $USER "/.wine" wine start ` echo $ff ` & ;; cdw) env WINEPREFIX ="/home/" $USER "/.wine" wine start` 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

Let's not 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 launch the application you need to open a terminal and write in it: wine path/ to application/ program.exe

If your application does not start or does not work correctly

There is a list of applications with descriptions on the wine website, I recommend checking it first. http://appdb.winehq.org/ - The site has a search field. If your English is bad, then use the translator http://translate.google.com/.

You can also open the folder with the application that you need to launch using the file manager, then right-click on the application and select the program to launch - Wine. Applications running via Wine that interact with Web pages require Gecko Gecko is a free web page rendering engine for the browser when working on 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 the Gecko archive there, it will automatically download 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.

Running via discrete video card

To run via 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 file_name.exe

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

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

Winetricks

Winetricks contains several dozen packages of various libraries for wine. For example, to install DirectX™, enter:

Winetricks d3dx9

To view a list of all packages, enter:

Winetricks?

Also, Winetricks has a simple GUI. To run it, enter.

For most games to work correctly, it is necessary to configure the registry of our pseudo Windows. To do this, we will use the Winetricks utility, which was installed along with Wine.
Perform the following manipulations: Applications->Wine->Winetricks. In the window that opens, check: Select the default wineprefix. OK

In the next window, mark: Change Settings. OK

You will have access to the basic settings of your Ubuntu-Wine-Windows combination.

Here check the following options:
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?! ). To edit, 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 was displayed in the registry settings.

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, there is no need to wash down your grief! It’s better to learn how to install and configure Wine on Ubuntu, and then you can install on your system some of the software that you really miss.

Installing Wine will allow you to use Windows applications on Linux.

Wine is a special application that allows you to run Windows programs on Linux systems. This is a compatibility layer that uses Windows libraries and then replaces them with Linux system calls so that software developed for other systems will work. Today, several million people already use Vine and are quite satisfied. The 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 VirtualBox. The creators tell us about this, “deciphering” the abbreviation through itself: W ine i s n ot e mulator (in smart words this is called a recursive acronym). A virtual machine is not created, the application simply implements the Windows API.

Installation and removal

Removal

It is important to know how to remove Wine. It doesn't always work properly. Some applications may be terribly slow or not launch 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 your computer, but also the folder in your 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 receive the remote directory along with the application itself.

Launching programs

There are different ways to run programs using Wine. The first, easiest one is through Nautilus:

  1. We find the software in the folder.
  2. Right-click on it.
  3. Select Wine as the program to launch.

The second, traditional one - through the terminal:

wine home/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 from?

We've dealt with Vine. Now all that remains is to understand where to find this or that software. You won't find anything in the Ubuntu App Center, of course. Most users follow two paths:

  • look for assemblies on websites and forums;
  • use special shells.

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

  • It contains not only games, but also many programs that are constantly being improved to perfection.
  • Paid and, as a result, a higher quality shell.
  • WineWizard. A new shell that has a slightly different approach. All successful solutions from different users are collected here, all you have to do is look for them.

Well, forums and websites 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 install almost any game on Ubuntu. For example, there is a video where a user demonstrates 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 can greatly smooth out the rough edges of this system and once again annoy greedy developers. You also know how to remove Wine, configure it and update it. It is quite possible that over time you will learn to install the necessary programs yourself without outside help.

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 the limits of your abilities and of course possibilities
programs. So, let's begin.

Wine is a separate implementation of the Windows API, not an emulator like most
think. It has been repeated more than once, but it will be appropriate here too. This is what the project does
unique and interesting for users of various systems, opens up various
ways to realize your ideas. The uniqueness lies in the fact that with the help
this program can run Windows applications on Ubuntu and others
Linux systems, as well as FreeBSD and Mac OS X. There is truth here too
its pitfalls. Some people think it will be easy to switch from one
systems to another, in this case we are considering Windows and Linux.

The misconception is that people think that they can launch from
under Wine, various software that they are used to and it is convenient for them to work in it.
Whatever one may say, nothing just happens. To make our favorite software work
Wine needs to sweat, re-read a bunch of manuals and weigh this volume
information. Of course, you won’t have to splurge on software, but you have to be ready for anything. The Wine project is developing very quickly, but it is not yet stable.
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 from a person who has just switched to Linux (in our case
Ubuntu): “How will I run programs from Windows?” He starts searching for this
topic and naturally comes across Wine.
The second question: “How to install it?” There are two ways: Place from
official repositories or compile it yourself from the sources. We'll consider
both options.

Option 1: Install from the repository.

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

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

We are waiting for the installation to complete...
All! Wine is installed and you can try installing games and programs.

Option 2: Compiling from source.

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

Let's go to the directory into which the archive with the source texts was unpacked:

Cd wine-1.3.11/

OpenGL support must be enabled before compilation. If we don't do this
Applications that require OpenGL will not work. In the terminal:

Gedit tools/wineinstall

We find the line starting with CONFARGS=, and then enter the necessary
build parameters. 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 by creating a package instead of make install

Sudo checkinstall

All. We are waiting for the installation to complete.

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 part: download the desired version of wine from the official website, unpack it, and copy the debian directory there from the source directory of the original wine1.3 package. Let's do

And we have a *.deb package for Ubuntu/Debian with all the necessary patches for the distribution, almost like from the official repository, but only a new version. In addition, you can safely remove it later via apt-get.
Let's look at the pros and cons of each option.

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

Minuses:
1. We will not be able to apply a patch, for example, to improve the operation of some toy.
2. Unstable operation 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 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 via System - Options - Main menu

I prefer the second option. Wine installed this way works
better than installed from 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 type in
the name of the game or program and look at what is written there. Usually it is described there
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
You can’t do shamanism with a tambourine - that means you need to create a separate prefix* for
our dances. * All Vine files are stored in a prefix, also called a bottle (similar to wine). Inside this bottle there are all the files on drive C, the registry, individual settings, and so on.

There can be any number of such bottles.

There may simply be some software that behaves very capriciously under Wine and requires some kind of crutches that will interfere with the normal operation of other Wine applications. Then we simply put this software in a separate bottle (prefix) and any settings will not affect other programs.

When wine is launched for the first time without the specified prefix, ~/.wine is used. If the prefix does not exist, Vine will create it and fill it with default content, create and fill the directories C:\windows, C:\Program Files, C:\users with files. Plus a clean registry will be created.
Let's go to our home directory and create a new directory. For example.wine2.
Next we 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

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

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

What does this 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 get clogged
which will cause other programs to crash. Therefore, you need to use separate
prefixes if you don’t want to configure everything many times.

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

winetricks will help us set up the prefix correctly.
Winetricks is a script that installs various components that
applications are required for operation, such as DirectX, Vcredist and much more.
How does this script work? It downloads libraries and components from
Microsoft resources. Exactly this way, and no other way. Why this script
needed? This makes working with Wine very easy. Without the script, we would have climbed 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 edit the registry,
enter various keys there. And besides this, winetricks has many settings
and functions.

To get acquainted with it, simply enter winetricks in the terminal

Editing the Registry

In the terminal we enter:

We are on the registry. We don't need to edit anything, we will only add.

Go to HKEY_CURRENT_USER/Software/Wine/Direct3D.

If there is no Direct3D directory, don't despair. I am writing this so that the reader understands
somewhere you need to edit or add.

In the terminal:

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

All these parameters will appear in the registry. This can be viewed in the folder indicated above.

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

PlayOnLinux

There is also PlayOnLinux. This is a separate program that uses Wine,
but everything is more automated and customized there. The program will download the required one
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'm giving away what's mine
preference for regular Wine, manual tuning and the work of one’s own brain, rather than
automated program.

Pros:
Everything is automated and we essentially don’t need to do anything.
You can keep multiple versions of Wine and use them for different prefixes.
The program itself creates prefixes.

Minuses:
It is impossible to predict everything that the program does, installs and downloads.
Everything that the program does can be done by hand, this is a plus to a person’s knowledge.
The Robot program will never compare to the human brain.

Mounting CD/DVD images

Windows has a utility for this called Daemon-Tools. It's very convenient
and an irreplaceable utility. A person has a question: Is there an analogue of this
miracle utilities? 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 any
There will be no problems and Wine will detect the image perfectly. If we don’t find the applet, don’t rush to reboot.
In the terminal we 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

A whole book could be dedicated to this, but I settled on one method that I always use:

Go to the virtual terminal:

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

Manually launch a new copy of the X server:

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

The gain from this is not big, but personally it’s enough for me. I will repeat once again:
There are many ways to run 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
use Wine to achieve your goals. Everything else is in your hands. If
you want to achieve your goal no matter what, but hope is already gone, no
never despair, because the solution may be right in front of your nose. Sit down
on two chairs is possible, but this requires desire and nerves of steel. Wish
- a thousand possibilities, not a desire - a thousand reasons.

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