Ubuntu – How to install the latest version of WINE as the system version


I usually use PlayOnLinux to manage my WINE versions via the interface, however, I would like to change my "system" WINE version (the version that loads when I double-click a file) so that I can just double-click on files to run them in the latest version of WINE even if they're the same "wineprefix". I have read the answer to this question but the versions in that repository only go up to version 1.8.

I would like the ability to make my system version of WINE 2.3 and keep it updated to the latest version automatically, so I don't want to manually compile or download packages all the time.

Also, if possible, I would like my system version to be a 32-bit one, and to instead use PlayOnLinux if I need a 64-bit wineprefix.

I am running Xubuntu 16.04 LTS 64-bit.

EDIT: I thought I'd include a list of commands to wipe & update Wine (EDIT 2: updated for 18.04, EDIT 3: Updated again for Ubuntu 18.04 in 2019):

# Remove old Wine
rm -Rf ~/.wine
sudo apt purge -y wine*

# Add key and repo
sudo dpkg --add-architecture i386 
wget -nc https://dl.winehq.org/wine-builds/winehq.key
sudo apt-key add winehq.key
sudo add-apt-repository -y 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main' 
sudo add-apt-repository -y 'ppa:cybermax-dexter/sdl2-backport' 
rm -f winehq.key

# Install
sudo apt update
sudo apt full-upgrade -y
sudo apt install -y winehq-devel playonlinux

# This is optional, but some programs need it.
sudo sed -i -e 's/scope = 1/scope = 0/g' /etc/sysctl.d/10-ptrace.conf 

# Did it work?
wine --version

Thanks to everyone who answered. This doesn't include changing Winearch, see below for that.

Best Answer

Install latest WINE version for Ubuntu

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

Run 32-bit WINE for default (rm old ~/.wine folder first)

WINEARCH=win32 WINEPREFIX=~/.wine winecfg

You can change different WINEPREFIX folder for 32-bit and 64-bit WINE environment

WINEARCH=win32 WINEPREFIX=~/win32 winecfg


WINEARCH=win64 WINEPREFIX=~/win64 winecfg
Related Question