Wine 32bit's future

Could anyone please confirm that Wine 32bit is no longer installable since wow64? I depend on it to run a database. Thanks in advance.

Yes, it’s mentioned in the release notes.

openSUSE Leap includes wine 10.10, available only in the wow64 flavor. Users requiring 32-bit binary execution should consider using the Flatpak version or a similar solution.

Thank you. I think that will solve my problem

Using XFCE.
I ran into trouble immediately. Following installation instructions…

ion@localhost:~> flatpak run org.winehq.Wine wine /home/ion/DATA/OS9/VCC.exe
/app/bin/wine: /app/bin/wine: cannot execute binary file
ion@localhost:~> 

I don’t understand the error, surely wine is meant to handle binary files. Execute permission is set on this file. Any help will be appreciated.

It should be flatpak run org.winehq.Wine /home/ion/DATA/OS9/VCC.exe

But this is what I get when I…

:~> flatpak run org.winehq.Wine /home/ion/DATA/OS9/VCC.exe
/app/bin/wine: /app/bin/wine: cannot execute binary file

Am I missing something?

yes
you are missing 2 things to fix the “cannot execute binary file” - you have to force the kernel to allow 32 bit instructions.

you need to edit /etc/default/grub and add “ia32_emulation=1” to this line in the file.

this is my how my line looks - yours will be different as I change a lot of options

GRUB_CMDLINE_LINUX_DEFAULT=“noresume splash=verbose showopts delayacct net.ifnames=0 usbcore.autosuspend=-1 ia32_emulation=1”

then run ‘grub2-mkconfig -o /boot/grub2/grub.cfg’ afterwards to update

then

sudo zypper in -y grub2-compat-ia32

reboot

now your program will execute as 32 bit support is turned on.

Also you will need to install this to allow the flatpak to see outside it’s C: drive

flatpak install flathub com.github.tchx84.Flatseal

then run
flatpak run com.github.tchx84.Flatseal

select wine

turn on All system files and All user files

now wine can see out of the Flatpak

I wouldn’t recommend giving the WINE flatpak access to “All System Files” and probably not even “All User Files” (or any flatpak, for that matter) as it’s pretty much completely negating any protection from the application being sandboxed in the flatpak container.

It’s a handy thing to be able to do for troubleshooting, but it’s a much better practice to figure out what the flatpak actually needs access to, and explicitly allow those via flatseal or flatpak override

1 Like

Doesn’t seem to work.

:~/DATA/OS9> wine VCC.exe
0130:err:environ:init_peb starting L"Z:\home\ion\DATA\OS9\VCC.exe" in experimental wow64 mode
wine: could not load kernel32.dll, status c0000135
ion@localhost:~/DATA/OS9>

It looks like I have to give up my 20 years of openSUSE for something else. I have to have access to execute 32-bit software. Any suggestion will be appreciated.

There is no need to do it if you already added the parameter manually. It is not a magic incantation which must followed to the letter.

@ionmich cd to the directory…

cd ~/DATA/OS9
flatpak run org.winehq.Wine ./vcc.exe

Following your suggestion, this is what I get.

ion@localhost:~/DATA/OS9> flatpak run org.winehq.Wine ./VCC.exe
wine: failed to open "./VCC.exe": c0000135
ion@localhost:~/DATA/OS9> 


@ionmich so it’s selinux…

update-bootloader --add-option ia32_emulation=1
update-bootloader
reboot

cat /proc/cmdline 
BOOT_IMAGE=/boot/vmlinuz-6.12.0-160000.5-default root=UUID=9e84a42e-65f0-4c5c-8985-45a07e0f3e3f mitigations=auto quiet security=selinux selinux=1 intel_iommu=on ia32_emulation=1

flatpak --user install org.winehq.Wine
Looking for matches…
Similar refs found for ‘org.winehq.Wine’ in remote ‘flathub’ (user):

   1) app/org.winehq.Wine/x86_64/stable-21.08
   2) app/org.winehq.Wine/x86_64/stable-22.08
   3) app/org.winehq.Wine/x86_64/stable-23.08
   4) app/org.winehq.Wine/x86_64/wow64-24.08
   5) app/org.winehq.Wine/x86_64/stable-24.08
   6) app/org.winehq.Wine/x86_64/wow64-25.08
   7) app/org.winehq.Wine/x86_64/stable-25.08

Which do you want to use (0 to abort)? [0-7]: 7
Required runtime for org.winehq.Wine/x86_64/stable-25.08 (runtime/org.freedesktop.Platform/x86_64/25.08) found in remote flathub
D
o you want to install it? [Y/n]: y
org.winehq.Wine permissions:
    ipc         network         pulseaudio            wayland                      x11       devices
    devel       multiarch       file access [1]       system dbus access [2]

    [1] xdg-desktop, xdg-documents, xdg-download, xdg-music, xdg-pictures, xdg-videos
    [2] org.freedesktop.NetworkManager, org.freedesktop.UDisks2


        ID                                                     Branch                   Op             Remote              Download
 1. [✓] org.freedesktop.Platform.Compat.i386                   25.08                    i              flathub             110.2 MB / 125.1 MB
 2. [✓] org.freedesktop.Platform.GL32.default                  25.08                    i              flathub             125.1 MB / 149.4 MB
 3. [✓] org.freedesktop.Platform.GL32.default                  25.08-extra              i              flathub              25.5 MB / 149.4 MB
 4. [✓] org.freedesktop.Platform.Locale                        25.08                    i              flathub              18.6 kB / 378.1 MB
 5. [✓] org.freedesktop.Platform.VAAPI.Intel.i386              25.08                    i              flathub              13.2 MB / 13.3 MB
 6. [✓] org.freedesktop.Platform                               25.08                    i              flathub             101.6 MB / 253.6 MB
 7. [✓] org.freedesktop.Platform.codecs_extra.i386             25.08-extra              i              flathub              13.4 MB / 13.7 MB
 8. [✓] org.winehq.Wine.gecko                                  stable-25.08             i              flathub              99.7 MB / 104.0 MB
 9. [✓] org.winehq.Wine.mono                                   stable-25.08             i              flathub              50.4 MB / 83.3 MB
10. [✓] org.winehq.Wine                                        stable-25.08             i              flathub              93.3 MB / 133.9 MB

Installation complete.

su -
setsebool selinuxuser_execmod 1
exit

flatpak --user run --filesystem=~/vcc-2.1.9.3-pre2-upd org.winehq.Wine ./vcc.exe

You can raise the bug report…

This change for SELinux should be done automatically by installing selinux-policy-targeted-gaming. Do you have it installed?
Or is this package not working as intended?

Readme:

# selinux-policy-gaming

SELinux policy changes for a simplified gaming experience

## Intention

Provide a simple way for packagers to allow gaming related changes to the
installed selinux policy, while still providing a central point to track and
evolve the changes needed for gaming on Linux.

The goal is to learn over time what these requirements are and improve the 
security of these changes over time.

## Details

The package makes the following change to the system during package install:

> semanage boolean -m --on selinuxuser_execmod
> semanage boolean -m --on selinuxuser_execstack

or identical change, but using another tool

> setsebool -P selinuxuser_execmod 1
> setsebool -P selinuxuser_execstack 1

This change has security implications, as it allows unconfined executables to
make their stack executable. Usually because certain libraries requiring text
relocation.

In the past administrator had to make the change manually on the system,
see https://en.opensuse.org/Portal:SELinux/Common_issues#Steam_Proton,_Bottles,_WINE,_Lutris,_not_working

@hui good spotting, that works :wink:

ion@localhost:~> cat /proc/cmdline

BOOT_IMAGE=/boot/vmlinuz-6.12.0-160000.20-default root=UUID=62e8364d-a7b0-492c-8fcd-8ee007d977c3 mitigations=auto quiet security=selinux selinux=1 ia32_emulation=1

Result…

on@localhost:~> flatpak --user install org.winehq.Wine
Looking for matches…
error: No remote refs found for ‘org.winehq.Wine’
ion@localhost:~> 

did you do the Flatseal items to allow 32bit wine to see outside it’s C drive?

Also I can show you how to allow wine command to work like before.

You have to fix 2 files to do it. Here is what I did so that the wine command works like it used to

sudo mv /usr/bin/wine /usr/bin/wine64
sudo echo 'flatpak run org.winehq.Wine "$1 $2 $3 $4 $5"' > /usr/bin/wine
sudo chmod 755 /usr/bin/wine

here are the correct commands to install wine32

flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak --user install  flathub org.winehq.Wine

choose option 7
say yes