This post is about running 32+64 bit Wine on Kaos or any other 64-bit only Linux distribution.
Not very space and memory efficient but relatively simple way is to install another minimal 32+64 bit Linux distribution and Wine in chroot environment.
Debian Linux has suitable tool, called debootstrap https://packages.debian.org/buster/debootstrap. I simply downloaded it and untared to / of my system (maybe someone could package it for Kaos).
Then steps are relatively simple. First select place in your system where you want Debian to go:
# CHROOT=/opt/debian
Run debootstrap. This will install minimal 64-bit Debian buster (current stable distribution) system to selected directory. Use nearest Debian mirror.
# sudo debootstrap --arch=amd64 --variant=minbase buster $CHROOT http://ftp.debian.org/debian
Now you need to mount some Kaos filesystems to be available for chrooted applications:
# sudo mount -t proc proc $CHROOT/proc
# sudo mount -t devpts devpts $CHROOT/dev/pts
(and add entries to /etc/fstab).
Now edit file $CHROOT/etc/apt/sources.list and add these 3 lines:
deb http://ftp.debian.org/debian buster main
#deb https://dl.winehq.org/wine-builds/debian/ buster main
#deb https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/Debian_10 ./
Now switch to chrooted Debian:
# sudo chroot $CHROOT
Run these in Debian. First enable i386 (32 bit) support:
# dpkg --add-architecture i386
Update packages and install some tools:
# apt-get update
# apt-get install dialog
# apt-get install locales
# dpkg-reconfigure locales
# apt-get install vim
# apt-get install wget
# apt-get install gnupg
# wget -nc https://dl.winehq.org/wine-builds/winehq.key
# apt-key add winehq.key
# wget -nc https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/Debian_10/Release.key
# apt-key add Release.key
Now open /etc/apt/sources.list in editor (for example vi which we installed earlier) and uncomment last two lines. Then refresh package list:
# apt-get update
And finally install Wine:
# apt install --install-recommends winehq-stable
(Wine 6.0) or
# apt install --install-recommends winehq-devel
(Wine 6.2)
Add some user to chrooted Debian:
# useradd user
# exit
for Debian root account and go back as simple user:
# sudo env -u HOME chroot --userspec=user $CHROOT
And try to run winemine
. Wine should start, install additional packages and load Minesweeper game
Now # exit
chrooted Debian and try to start Minesweeper from Kaos command line:
# sudo env -u HOME chroot --userspec=user $CHROOT winemine
Minesweeper should start again. To install Windows apps, copy installers to $CHROOT/home/user, go to chrooted Debian as user and run wine installer.exe
.
TODO:
- Figure out how to run chrooted Wine without sudo.
- Figure out why chrooted Wine can't find OpenGL.
- Figure out how to add Windows apps to KDE application menu.