Setting up and installing Wine on Ubuntu

WineWizard program

Not everyone has come to terms with the lack of Photoshop on Ubuntu, as well as a number of other useful programs or PC games available only for Windows. There is a way out for such people, and it is called Wine. No, you don’t need to drink grief! Better find out how to install and configure Wine on Ubuntu, and then you can install some of the software you’ve missed a lot on your system.

Wine on Ubuntu

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

Contents

What is Wine

Wine is a special application that allows you to run Windows programs on Linux systems. It 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 already several million people use Wine and are quite satisfied. Developers release updates very often, so the program keeps getting better year after year. Some craftsmen even manage to run modern games through it.

Wine for Ubuntu

Wine cannot be called an emulator like VirtualBox. The creators also tell us about it, “decrypting” the abbreviation through itself: Wine is not emulator (in clever words it is called a recursive acronym). The virtual machine is not created, the application just implements the Windows API.

Installing Wine on Ubuntu

You can install Wine from the official repositories – both the latest official and new beta versions. Alternatively, you can compile a copy yourself from source or use the personal PPA archives. Let’s take a look at all the methods in order.

Launching Terminal in Ubuntu

Installation from the official repository

To install the latest official build, use the command:

sudo apt-get install wine

Sudo apt install wine-stable command

Very often the Ubuntu repos contain an older version. Therefore, it is worth installing through the repositories of the application itself. To do this, the command you enter needs to be slightly changed:

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

Sudo add-apt-repository ppa command: ubuntu-wine / ppa

The same operations are easy to perform through the Application Center, which in the latest versions of Ubuntu does an excellent job.

Using PPA

What, in fact, has changed in the previous command? We ran the installation using a custom archive (in this case, an application archive) PPA. PPA technology, aka Personal Package Archive or Personal Package Archive, allows Ubuntu users to use personal developer repositories.

First, let’s check the bit capacity of our system. It can be found with the command $ dpkg –print-architecture . It returns i386 on 32-bit systems, amd64 on 64-bit systems.

32-bit support on amd64 systems is added like this:

sudo dpkg –add-architecture i386

Sudo dpkg --add-architecture i386 command

Install the signature key:

wget -qO – https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add –

Command for adding a repository in Ubuntu

Set up a connection to the Wine repository. Each version of Ubuntu has its own repository and its own command:

On Ubuntu 16.04.x

sudo apt-add-repository ‘deb https://dl.winehq.org/wine-builds/ubuntu/ xenial main’

On Ubuntu 18.04.x

sudo apt-add-repository ‘deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main’
sudo add-apt-repository ppa: cybermax-dexter / sdl2-backport

Second command for adding repository in Ubuntu

On Ubuntu 19.10.x

sudo apt-add-repository ‘deb https://dl.winehq.org/wine-builds/ubuntu/ eoan main’

Obtaining packages in Ubuntu

The following commands will install the recommended system versions from the connected repository:

sudo apt update
sudo apt install —install-recommends winehq-stable

Installing Wine on Ubuntu via PPA

If you suddenly get a dependency error, install via the aptitude interface :

sudo apt install aptitude
sudo aptitude install winehq-stable

Confirming Wine Installation in Ubuntu via PPA

Then you can start configuring via winecfg . The Wine version is checked using the wine version command .

Entering the winecfg command

Installing the beta version

If you follow the development of Wine, you may want to use some of the features before they (maybe very long time ago) are in the official release. Especially for such cases, there is a command to install the “beta” – the so-called staging version. We write the command:

sudo apt install —install-recommends winehq-staging

Command to Install Beta Wine on Ubuntu

We confirm our choice and wait for the installation to complete.

The staging version is removed like this:

sudo apt-get purge winehq-staging

Command to uninstall Beta Wine on Ubuntu

Self-assembly from source codes

Let’s say we need a separate copy of the system in order to try out some personal changes on it. Let’s try to build it using open source.

Programs and updates in Ubuntu

Let’s go to the “Programs and Updates” menu, in the “Ubuntu Software” tab, make sure that we can work with the sources. If there is no corresponding checkmark, we put it down.

Source code in Ubuntu

Further commands for downloading and unpacking the Wine archive:

sudo apt build-dep wine-stable
sudo wget https://dl.winehq.org/wine/source/4.x/wine-4.8.tar.xz
sudo tar -xvf wine-4.8.tar.xz
cd wine-4.8 /

Command for downloading Wine components

The command to download a specific version of Wine

The command to unpack the Wine archive

Go to the folder with Wine

If we need another version of Wine, of course, we enter the addresses of the corresponding archive.

On 64-bit systems, then enter the following:

sudo ./configure —enable-win64

Preparing the OS for Wine Installation

For 32-bit systems:

sudo ./configure

The command to start the Wine compilation process

And finally, we build Wine and install it:

sudo make
sudo checkinstall
dpkg -i wine.deb

Checking the installation of a ready-made package

The command to install a ready-made package

Additional components

The program is installed, but now you need to configure it and update the packages. To update the list of packages, use this command:

sudo apt-get update

Command to update the package list

Now let’s download additional components: Gecko and Winetricks.

Gecko is a web page rendering engine. If applications running through Wine need access to web pages, the program will automatically search for Gecko on the computer or download it itself. In this case, running applications can crash, so it’s better to download this engine in advance.

Winetrick is a special script that allows you to download components from Microsoft. For example DirectX and many others.

Install Gecko:

sudo apt-get install wine-gecko ‹version number›

Instead of ‘version number’ we enter the version number of installed Wine.

Command to install Gecko

Install Winetrick:

sudo apt-get install winetricks

It is worth immediately downloading some frequently used components, for example, the same DirectX:

winetricks d3dx9

To view all packages, enter the command:

winetricks?

Command to view all packages in Wine

It remains to force the configured Wine to create a special directory where all the files will be stored:

winecfg

Removing an application

It is important to know how to uninstall Wine. It doesn’t always work well. Some applications can be terribly slow or not launch at all. In such a case, reinstalling the emulator to a newer version should fix the problem.

However, not only Wine itself needs to be removed 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 *

Removing Wine on Ubuntu

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

Launching programs

There are many ways to run programs with Wine. The first, the easiest, is through Nautilus:

  • find the software in the folder;
  • right-click on it;
  • select Wine as the program to run.

The second, traditional one, is through the terminal:

wine home / user / program.exe

Command to run a command in Wine

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

Where to get programs

We have dealt with Wine. It remains now to understand where to find this or that software. You won’t find anything in the Ubuntu Application Center, of course. Most users follow two paths:

  • looking for assemblies on sites and forums;
  • use special shells.

PlayOnLinux shell

Wrappers are applications that give Wine a graphical interface and allow you to load normal assemblies with all the required packages. Most Popular:

  • PlayOnLinux. Contains not only games, but also many programs, constantly perfected.
  • CrossOver. Paid and, as a result, better quality shell.
  • WineWizard. A new shell that takes a slightly different approach. All the successful solutions of different users are collected here, you just have to look for them.

WineWizard program

Well, forums and sites offer a lot of different assemblies and instructions for installing games, office applications and whatever. If you set yourself a goal and spend a certain amount of time, you can put almost any game on Ubuntu. For example, there is a video where the 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 can 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.

Leave a Reply

Your email address will not be published. Required fields are marked *