Wine

Installation

https://wiki.winehq.org/Download

apt install --install-recommends winehq-devel
apt install --install-recommends winehq-staging

Different versions

apt install winehq-<branch>=<version>
apt install winehq-staging=7.14~jammy-1 wine-staging=7.14~jammy-1 wine-staging-amd64=7.14~jammy-1 wine-staging-i386=7.14~jammy-1

Utilities

wineserver – the Wine server

Options

-k[n], --kill[=n]Kill the currently running wineserver, optionally by sending signal n. If no signal is specified, sends a SIGINT first and then a SIGKILL. The instance of wineserver that is killed is selected based on the WINEPREFIX environment variable.
-v, --versionDisplay version information and exit.

Kill a running wineserver

WINEPREFIX=/pathto/myprefix /opt/wine-staging/bin/wineserver -k
WINEPREFIX=/pathto/myprefix /opt/wine-devel/bin/wineserver -k

winetricks

Options

-f, --forceDon’t check whether packages were already installed
--self-updateUpdate this application to the last version
-f, --forceDon’t check whether packages were already installed

Commands

listlist categories

Get the latest version

./winetricks --self-update

Install dotnet

sh winetricks list-all | grep dotnet
WINEPREFIX=/path/to/wineprefix winetricks dotnet35
WINEPREFIX=/path/to/wineprefix winetricks dotnet35sp1
WINEPREFIX=/path/to/wineprefix winetricks dotnet48

Use winetricks with another wine version

WINEPREFIX=/path/to/wineprefix WINE=/pathto/wine-git/wine ./winetricks dxvk

Documentation

https://wiki.winehq.org/Winetricks

Vulkan

Packages needed

apt install mesa-vulkan-drivers mesa-vulkan-drivers:i386 libvulkan1 libvulkan1:i386

Install dxvk in a prefix

WINEPREFIX=/path/to/wineprefix ./winetricks dxvk

Reinstall/update:

WINEPREFIX=/path/to/wineprefix ./winetricks --force dxvk

https://github.com/doitsujin/dxvk

Registry keys

https://wiki.winehq.org/Useful_Registry_Keys

Prefixes

Create new prefix (64bits is default):

WINEPREFIX=/path/to/wineprefix winecfg
WINEARCH=win32 WINEPREFIX=/path/to/wineprefix winecfg

Top open the explorer in a wine window:

WINEPREFIX=/path/to/wineprefix wine explorer /desktop=test,2560x1440 explorer

To kill all Wine processes in a wineprefix:

WINEPREFIX=/path/to/wineprefix wineserver -k

Compilation

Compile the 32 bits version with Vulkan:

CC="ccache gcc -m32" ./configure --verbose --disable-tests --with-vulkan
make -j

After compilation, the executables are:

./wine
./server/wineserver

Also, env can set to:

WINESERVER=/path/to/wine-git/server/wineserver

Infos: https://wiki.winehq.org/Building_Wine and https://wiki.winehq.org/Regression_Testing

Run a wine program as another user

This is not specific to wine, but it feels right to put it here.

Allow access to the X server

As user1:

xhost +local:

https://ithero.eu/documentation/x11/#2-xhost-server-access-control-program-for-x

Then:

$ su - user2
Password:
$ export DISPLAY=:0

from: https://unix.stackexchange.com/questions/108784/running-gui-application-as-another-non-root-user

Allow access to the Pulseaudio server

As user1:

pactl load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1

https://ithero.eu/documentation/sound/pulseaudio/#13-module-native-protocol-unixtcp

As user2:

echo "default-server = 127.0.0.1" > ~/.pulse/client.conf

from: http://billauer.co.il/blog/2014/01/pa-multiple-users/

Blizzard jokes

find "/wineprefix/drive_c/Program Files (x86)/Battle.net" -exec setfattr -x user.DOSATTRIB '{}' \;