Install Wine and PlayOnLinux Ubuntu 21.10

Install Wine on Ubuntu 21.10

Refer: https://wine.htmlvalidator.com/install-wine-on-ubuntu-21.10.html

Check installed architectures

Verify 64-bit architecture. The following command should respond with "amd64".

$ dpkg --print-architecture

See if 32-bit architecture is installed. The following command should respond with "i386".

$ dpkg --print-foreign-architectures

If "i386" is not displayed, execute the following.

$ sudo dpkg --add-architecture i386

Recheck with.

$ dpkg --print-foreign-architectures

Add the WineHQ Ubuntu repository.

Get and install the repository key.

$ wget -nc https://dl.winehq.org/wine-builds/winehq.key

$ sudo -H gpg -o /etc/apt/trusted.gpg.d/winehq.key.gpg --dearmor winehq.key

Add the repository.

$ sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ impish main'

Update the package database.

$ sudo apt update

Install Wine

The next command will install Wine Stable. If you prefer Wine Development or Wine Staging, replace winehq-stable with either winehq-devel or with winehq-staging.

$ sudo apt install --install-recommends winehq-stable

Verify the installation succeeded
$ wine --version

Configure Wine

The default Wine configuration prepares Wine as a Windows 7 environment, which is good for some older Windows apps, but many contemporary apps will be better matched to Windows 8.1 or Windows 10. In addition, other configuration options may be significant.

To bring up Wine's configuration panel, open a Terminal window and execute winecfg. When prompted, set your preferred version of Windows and accept all offers to install Mono and Gecko.

Depending on the version of Wine, Gecko may need to be installed twice (for 32-bit and for 64-bit) or not at all. (Wine 6.0.2 will install Gecko twice. Wine 6.17 and later will not ask to install Gecko, but a Windows app that needs Gecko will, during installation, prompt to be allowed to install it.)

$ wine winecfg

If you are creating custom Wine prefixes, this configuration must be repeated for each prefix.
Two simple tests

Just for fun, or to see Wine in action …

Display a simple clock.

$ wine clock

Run Wine's builtin web browser.

$ wine iexplore

Install PlayOnLinx

Refer: https://installati.one/ubuntu/21.10/playonlinux/

Install playonlinux Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install playonlinux using apt-get by running the following command:

sudo apt-get -y install playonlinux

Installing Wine 5.0 on Ubuntu 18.04

Refer: https://itsfoss.com/wine-5-release/

Troubleshooting

Things worked much better when changing the compatibility to Windows XP.  Navigate to each *.exe and add compatibility to Windows XP.  Have done this for Dreamweaver, Fireworks, TN3270, WinSCP and Textpad

winecfg

How to install Wine 5.0 on Ubuntu and Linux Mint

If you have Wine installed before, you should remove it completely to avoid any conflict (as you wish). Also, the WineHQ key repository key was changed recently, you should refer to its download page for additional instructions on that according to your Linux distribution.

The source for Wine 5.0 is available on its official website. You can read more about building wine in order to make it work. Arch-based users should be getting it soon.

Here’ I’ll show you the steps to install Wine 5.0 on Ubuntu and other Ubuntu-based distributions.

First, remove existing Wine install with this command:

sudo apt remove winehq-stable wine-stable wine1.6

Download the official Wine repository key and add it:

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

Now the next step involves adding the repository and for that, you need to know your Ubuntu version first.

For Ubuntu 19.10, add this repository:

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

If you are using Ubuntu 18.04 or Linux Mint 19.x, use this command to add the repository:

sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'

For Ubuntu 16.04 and Linux Mint 18.x series, you can use this command:

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

Now that you have added the correct repository, you can install Wine 5.0 using this command:

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

Install Wine on Ubuntu 18.04 with PlayOnLinux

Refer: http://tipsonubuntu.com/2019/02/01/install-wine-4-0-ubuntu-18-10-16-04-14-04/

The official wine repository offers Ubuntu packages for all current Ubuntu releases, so you can easily install it via following steps:

1. Open terminal from application menu, then run command to enable 32 bit architecture:

sudo dpkg --add-architecture i386

Type user password (no visual feedback) when it prompts and hit Enter.

2. Run command to download and add the repository key:

wget -nc https://dl.winehq.org/wine-builds/winehq.key

sudo apt-key add winehq.key

3. For Ubuntu 18.04, Linux Mint 19.x, run command to add the repository:

sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'

For other releases, replace bionic in the code with:

cosmic for Ubuntu 18.10.
xenial for Ubuntu 16.04, and Linux Mint 18.x.
trusty for Ubuntu 14.04.

4. Finally check system package cache and install Wine 4.0:

sudo apt-get update

sudo apt-get install --install-recommends winehq-stable

For Ubuntu 18.04 and higher, you can skip apt-get update as it’s done after adding PPA.

How to Use Wine in Ubuntu:

Once installed, you need to generate configuration file by running command:

winecfg

It prompts you to install some libraries and finally launches the configuration dialog.

To run a .exe file, right-click on file, select “Open with Other Application”, and choose “Wine Windows Program Loader”.

Uninstall:

To remove Wine repository, go to Software & Updates -> Other Software, highlight the repository line and remove it.

Now you can install PlayOnLinux with the software store...

Wine HQ Needs Key Updated

Refer: https://www.reddit.com/r/wine_gaming/comments/a7pno3/winestaging_repo_missing_public_key/ec59pqb/

$ wget -nc https://dl.winehq.org/wine-builds/winehq.key; sudo apt-key add winehq.key

Installing Wine in Ubuntu 16.04

Installing Wine 3.0

Refer: https://linuxconfig.org/how-to-play-world-of-warcraft-on-linux-with-wine

If you are getting black buttons, use winecfg and change default setting to Windows XP instead of Windows 7

$ winecfg
$ sudo apt install winetricks
$ winetricks, launch, and choose option install corefonts
$ wine uninstaller

Refer: http://www.omgubuntu.co.uk/2017/04/how-to-add-wine-repository-ubuntu

You might want to install from /tmp, because your going to download a Release.key

Instructions: install-wine-on-ubuntu.txt

Older Install Wine in Ubuntu 16.04

Refer: http://linuxg.net/install-wine-1-8-on-ubuntu/

Install with the following:

$ sudo add-apt-repository ppa:ubuntu-wine/ppa
$ sudo apt-get update
$ sudo apt-get install wine1.8 winetricks

Remove with
$ sudo apt-get uninstall wine1.8 winetricks

How To Create A Wine Shortcut – Ubuntu 14.04

Refer: http://nextdime.wordpress.com/2014/06/20/how-to-create-a-wine-shortcut-in-ubuntu/

You can create by hand a desktop shortcut for your applications installed with wine by following these steps:

Open your favourite text editor (gedit, nano, etc.), create a new file with the following content and save it to your Desktop with a name having extension .desktopIn this example, I’ve chosen to the name inetexplorer.desktop and saved it to my desktop.

[Desktop Entry]
Name=Internet Explorer
Exec=wine "C:\Program Files\Internet Explorer\iexplore.exe"
Icon=/path/to/iconfile
Type=Application
Categories=Wine;

Here, replace the value for Name field with that of the target application’s name. (In the example, it’s Internet Exolorer.) The value of Exec would be in the format:

wine "C:\path to the\executable file"

for GUI applications:
wineconsole "C:\path to the\executable file"

for CLI application like say:
wine "C:\Program Files\Internet Explorer\iexplore.exe"

enclosing the path within double quotes ".. .." is important if the path contain blank spaces.

Replace /path/to/iconfile (the value for Icon field) with the path of an icon file
likeIcon=/home/username/Pictures/internet-explorer.png) or you can omit this line of entry.

On the left is a shortcut with icon specified, for the one on right, not. iconField
Turn on the file’s execute bit on.Graphically you can do it by right clicking the .desktop file, and from the context menu selectProperties. In the properties window, select Permission tab, look for a label Execute: and check-mark the check-box next to it so that the shortcut becomes executable.

selecting property from right-click context menu rightClickTheFile

setting execute permission executableProperty

From terminal, you can do this with:

chmod +x $USER/Desktop/inetexplorer.desktop
where $USER/Desktop/inetexplorer.desktop should be the absolute path of the desktop shortcut that was created.