Useful Tips

Install Wine

Pin
Send
Share
Send
Send


Our experienced team of editors and researchers contributed to this article and tested it for accuracy and completeness.

A team of content managers carefully monitors the work of editors to ensure that each article meets our high quality standards.

In this article, you will learn how to install and run Wine on a Linux computer. Wine is a program that allows you to run Windows programs on a computer running another (non-Windows) operating system.

Content

Wine - an application that is a compatibility layer with Windows API using libraries Windows to ensure the health of applications developed for the family of OS Microsoft Windows in a different environment, such as Ubuntu. Using Wine, you can install and run various programs as if you are using Windows.
Wine actively developing. Not all applications work stably enough in Wine, but Wine already in use by several millions of users worldwide.
The name of the program Wine (waɪn - between "wyne"And"vine", Russian Wine) is a recursive acronym for "Wine Is Not an Emulator ”- Russian "Wine is not an emulator."

For latest versions of wine and ubuntu 64 bits

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

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 work. To do this, either select the main menu item Applications → Wine → Configure Wine, or execute the command in the terminal:

Launch Windows applications

In order to start the application you need to open the terminal and register in it:

If your application does not start or does not work correctly The wine site has a list of applications with a description, for starters I recommend checking with it. 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 run using the file manager, then right-click on the application and select the program to start - Wine.

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

where you need to replace with the version of installed Wine.

Triggering through a discrete graphics card

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

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

Winetricks

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

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

To view a list of all packages, type:

Also, Winetricks has a simple GUI. To start it, enter:

Install Wine

The first question of the person who just switched to Linux (in our case Ubuntu): "How will I run programs from Windows?". He begins a search on this subject and naturally stumbles upon Wine. The second question: "How to put it?". There are two ways:

  1. Deliver from official repositories.
  2. Compile yourself from the source.

We will consider both options.

Compiling Wine from source

Download the source from the official website (winehq.org/download), where they are present. In my case it’s Wine 1.3.11. Unpack the source. Next, enter the following commands in the terminal:

In the editor we find the line starting with CONFARGS =, and after that we enter the necessary assembly parameters into it. In our case, the line will look like this:

Install through package creation:

Everything. We are waiting for the installation to complete. There is also an intermediate option for the Jedi on debian-based distributions. Briefly:

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

and we get 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, it can still be safely removed later via apt-get. Consider the pros and cons of each option. Option 1. Pros:

  1. Everything has been collected for us and there is no need to get puffed, everything is ready for use.

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

Option 2. Pros:

  1. Ability to apply patches to improve performance.
  2. Stable work with unstable video card drivers.

  1. There is no menu in the 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.

You can add it yourself through System -> Options -> Main menu. I give preference to the second option. Wine installed this way works better than installed from the repositories. But this is just my little IMHO.

Setting up Wine

After installation, you must configure the program with the command:

winecfg

Fig. 1. winecfg settings window

This command will create a .wine directory in the user's home directory, where the system files with settings will be located - an analogue of the Windows registry and drive_c - a directory for Windows applications. With winecfg, you can select the default Windows version for individual applications, library versions, configure graphics and sound, integration with the desktop, select the drives from which Windows-programs can be launched.

And you can edit the registry using the usual command:

regedit

Fig. 2. regedit window under Wine

After such an initial setup, it will already be possible to install and run programs using Wine. But many programs will not be able to work, because they require certain libraries, fonts, etc., which will have to be installed separately. To do this, we use the winetricks program, which is part of the standard Wine software package. In addition to fonts and libraries, Winetricks also allows you to install popular programs and games and make Wine settings.

Let's try installing Internet Explorer 7 using winetricks, for this we type in the terminal:

winetricks ie7

We will wait for a while until the necessary files are downloaded and the installer starts, click the “Next” button and wait for the installation to complete. To start Internet Explorer later, you will need to run the command:

wine 'C: Program Files Internet Explorer iexplore'

But it is better to run programs from the native directory. Go to the directory (if there is a space in the file name, then you need to put a backslash “” in front of it):

/.wine/drive_c/Program Files / Internet Explorer /

And run the program:

wine iexplore.exe

In order not to type these commands every time, you can create a simple script. Go to the home directory:

cd

Create the ie.sh file using the nano editor:

nano ie.sh

Paste the lines in the file:

/.wine/drive_c/Program Files / Internet Explorer / wine iexplore.exe

Save the file - Ctrl + O and exit the editor - Ctrl + X. We make the file executable:

chmod + x ie.sh

Now to run ie, just type:

And you can copy the file to the desktop and run it with the mouse:

Installing the program from a CD or DVD can be performed using the following command:

wine start 'D: setup.exe'

Similarly, you can install other programs and libraries. You can also use the graphical interface of the program by typing winetricks without parameters. Then select “Select the default wineprefix”.

Fig. 3. The main winetricks window

Next, select the action that we will perform, for example, installing the library (Install a Windows DLL or component):

Fig. 4. Choosing winetricks action

And check off the libraries that need to be installed. You can do the same with the command line, for example:

winetricks d3dx9 dotnet20

Thus, we will install two components at once: d3dx9 and dotnet20. To correctly display popular fonts in programs, install them:

winetricks allfonts

Libraries are a bit trickier. Different programs may require separate settings, certain versions of Windows and libraries. To do this, you can create several Wine configurations by specifying the settings directory using an environment variable WINEPREFIX. Default WINEPREFIX =

/.wine To create new settings in the directory

Thus, you can create any number of configurations. To configure and install fonts and libraries, type:

To run an installed program:

You can complete the program using the command:

killall -9 program.exe

And to complete the work of all programs running under Wine, you need to type:

wineserver -k

To delete settings and all programs in the prefix

/.wine2 you just need to delete the directory:

In the same way, you can delete the main Wine directory:

Be careful, this will also remove all Windows applications that are installed in this directory!

winefile - launch the file manager, with which you can run Windows-based applications, copy and delete files, etc. You can find out which applications and games run under Wine and how to configure settings for specific applications on the website: http://appdb.winehq.org/ English-language site. To search for applications, select “Browse Apps” in the menu and enter the name of the program in the “Name” field. Versions of programs that run and work without errors or with minor issues have a Platinum or Gold rating. If the program does not work at all, then it is assigned a rating of "Garbage".

Playonlinux

Playonlinux Is a program that greatly simplifies the installation and configuration of Windows applications to run under Wine. It automatically downloads from the Internet and installs all the necessary components to run specific programs, as well as the programs themselves, if they are distributed free of charge via the Internet. Otherwise, you need an installation disk with the program. Install the program in any way, for example, in Ubuntu with the command:

sudo apt-get install playonlinux

playonlinux

Using the program is extremely simple. Click the "Install" button.

Fig. 5. The main window of PlayOnLinux

Select the program you want to install. If you did not find the desired program in the selection window, you can try clicking "Install a program that is not in the list" at the bottom of the window.

Fig. 6. PlayOnLinux program selection window

It remains to click the "Next" button several times, and in some cases to select the program configuration. After installation, program shortcuts will appear in the main PlayOnLinux window, from where they can be launched by double-clicking, or by clicking on the “Run” button. You can also create shortcuts to Windows programs on the desktop using the "Shortcut" button.

Fig. 7. The main window of PlayOnLinux with the installed Windows program FireFox

Other programs based on Wine

There are also paid software products based on Wine. Crossover allows you to run various versions of Microsoft Office, Adobe Photoshop and many other programs and games under Linux. [email protected] It is mainly aimed at supporting popular programs for business: 1C: Enterprise, Consultant Plus, GARANT and others. You can get acquainted with these programs on the official websites: http://www.codeweavers.com/products/ http://etersoft.ru/products/wine

Virtualbox

Virtualbox - One of the most popular programs for virtualization, which allows you to run various operating systems simultaneously on one computer. VirtualBox installation in Ubuntu can be performed in the standard way by typing in the terminal:

sudo apt-get update

sudo apt-get install dkms

sudo apt-get install virtualbox

dkms supports dynamic kernel modules (vboxdrv, vboxnetflt, vboxnetadp), which are necessary for VirtualBox to work. In other versions of Linux, the appropriate commands are used for installation (yum, urpmi etc.), you can also use the installation file or compile the program from the source code. See the article “How to install programs on Linux” for details.

Download VirtualBox for various operating systems here: https://www.virtualbox.org/wiki/Downloads. After the installation is complete, add the user to the vboxusers group, instead of username, you must specify the correct user name under which VirtualBox will work:

sudo usermod -a -G vboxusers username

Now you can run the program through the menu, or by typing in the terminal:

virtualbox

Fig. 8. VirtualBox Manager with already installed operating systems

Now we will put the operating system, for this you need to have the installation disk or its image. Click the “Create” button, the wizard for creating a new virtual machine starts:

Fig. 9. Wizard to create a new virtual machine

Click the “Forward” button, enter the name of the virtual machine, for example, “Windows XP”, and below we select the appropriate type and version of the operating system:

Fig. 10. Selecting an operating system version

We chose Windows XP because it is less demanding on computer resources, takes up less space, and loads faster. But support for this system has already been officially discontinued. Naturally, you can install other versions of Windows that VirtualBox supports: Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7, Windows 8, Windows Server 2012. Next, select the amount of RAM that will be allocated to the virtual machine:

Fig. 11. The choice of memory

The choice depends on the OS version, the amount of physical memory, planned tasks, the number of guest systems launched simultaneously. Depending on the version of the operating system, VirtualBox will offer various default parameters, but they are usually minimal, it is advisable to increase them. In any case, the normal operation of modern operating systems requires at least 1-2 Gigabytes of RAM (512 MB is enough for Windows XP) and you still need to leave the memory to the main host system. Next, we create a new virtual hard disk or select the ones already created earlier.

Fig. 12. Virtual hard disk

On the next screen, select the type of disk, the default is standard VDI.

Fig. 13. Selecting a disk type

Next, we indicate that our disk will be dynamic, this allows us to save disk space on physical media.

Fig. 14. Choosing virtual disk attributes

Specify the disk size, leave the default location (the disk will be located in the folder

/ VirtualBox VMs / System Name.

Fig. 15. Choosing the location and size of the virtual disk

It remains to click the "Create" button.

Fig. 16. The last stage of creating a new virtual machine

Virtual machine created. We select it in the VirtualBox manager and click the "Properties" button.

Fig. 17. System selection

Here you can configure in detail the created virtual machine. First of all, you must specify the drive from which we will install the system. To do this, click “Media” on the left, select an empty disk, right-click on the disk icon and specify the distribution image, or check the “Live CD / DVD” checkbox and insert the physical disk.

Fig. 18. Selecting the installation disk

Next, go to the tab “System → Motherboard”, check the boot order, the CD / DVD-ROM should be higher than the hard drive. If this is not the case, change the loading order with the arrows.

Fig. 19. System settings

If speed with graphics is important, go to the Display tab, increase the amount of video memory and turn on acceleration.

Fig. 20. Display settings

We go back to the VirtualBox Manager and click the "Start" button. Next, we install the system, as usual. After installing the guest system, load it and select "Install add-ons of the guest OS" in the "Devices" menu. Instead, you can press the right key combination Ctrl + D. After installing the add-ons, the system will be ready to work.

Fig. 21. Installed and ready-to-use Windows XP system in VirtualBox

Loading the guest operating system after starting VirtualBox is done by the “Start” button. Switching the mouse pointer between the main and guest systems is automatic, but you can force-switch using the button right ctrl (Host key - can be changed in the settings) and right ctrl + i. The same button in combination with various keys serves to perform a number of functions:

Host key + F - Switch to full screen mode and vice versa.

Host key + Del - replaces the combination of Ctrl + Alt + Del.

Host key + i - disable mouse integration.

Host key + C - switching to scaling mode, in which you can set an arbitrary window size, returning to standard mode is done using the same key combination.

Host key + D - Installing add-ons for the guest operating system.

Host key + T - take a picture, save the state of the OS. You can restore the system from the saved state in the main window of the VirtualBox manager by clicking on the “Snapshots” button. A very convenient feature for fighting viruses, testing and debugging programs that can damage the system. You can always roll back the system to a stable state.

Host key + S - open the settings window.

Host key + R - reboot the system.

Host key + Q - close the virtual machine (log out).

Install programs and games

First we go to appdb.winehq.org. Сверху, в поисковике вбиваем название игры или программы и смотрим что там написано. Обычно там описаны тесты на различных системах, рекомендации для стабильной работы и многое другое. Если программа работает без проблем, значит с чистой душой её устанавливаем простым кликом. Если это какая нибудь серьёзная игра или программа и без шаманства с бубном не обойтись - значит надо создавать отдельный префикс для наших танцев. Все файлы вайна хранятся в префиксе, или ещё называемом бутылкой (по анологии с вином/wine). Там внутри этой бутылки имеются все файлы диска C, реестр, индивидуальные настройки и так далее. Таких бутылок может быть сколько угодно.It just might be some kind of software that behaves very moody under the vine and it needs some kind of crutches that will interfere with the normal operation of other vine applications. Then just put this software in a separate bottle (prefix) and any settings will not affect other programs. When a vine starts for the first time without the specified prefix, it is used

/.wine. If the prefix does not exist, the vine will create it and fill it with default content; it will create and fill in the files with the C: windows, C: Program Files, C: users directories. Plus a clean registry will be created. We go to our home directory and create a new directory. For example .wine2. Next, go to the terminal and enter:

Pin
Send
Share
Send
Send