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

-k[n], –kill[=n],

The instance of wineserver that is killed is selected based on the WINEPREFIX environment variable

WINEPREFIX=/ptahto/myprefix /opt/wine-staging/bin/wineserver -k

winetricks

Options

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

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

Install dxvk

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

Use winetricks with another wine version

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

Documentation

https://wiki.winehq.org/Winetricks

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/