x86_64 chroot on Manjaro Arm + Install x86_64 *.deb + Install Wine & Windows apps

I got this error without sudo:

[rna@rna ~]$ schroot -c ubuntu-x64
W: line 3 [ubuntu-x64] aliases: Alias ‘ubuntu-x64’ already associated with ‘unknown’ chroot
W: line 3 [ubuntu-x86] aliases: Alias ‘ubuntu-x86’ already associated with ‘unknown’ chroot
E: Access not authorised
I: You do not have permission to access the schroot service.
I: This failure will be reported.
[rna@rna ~]$ schroot -c ubuntu-x86
W: line 3 [ubuntu-x64] aliases: Alias ‘ubuntu-x64’ already associated with ‘unknown’ chroot
W: line 3 [ubuntu-x86] aliases: Alias ‘ubuntu-x86’ already associated with ‘unknown’ chroot
E: Access not authorised
I: You do not have permission to access the schroot service.
I: This failure will be reported.

UPDATE: Ubuntu x86 Bionic (chroot)

As I suspected, running wine in Ubuntu Bionic x86 (wine-stable from ubuntu universe) seems promising. Now I am able to run winecfg:

Will let you know when I succeffully installed an app in wine

Screenshot_2020-07-03_07-13-07

Installing Sketchup via Wine.

Screenshot_2020-07-03_13-37-15

However, in ubuntu x86 both winetricks and playonlinux do not work, therefore when installing sketchup 2008, I got error, because I have to install .net framework 2.0 first. Without winetricks it is difficult

1 Like

This means you did not configure schroot to allow your user.

Check out the man page for schroot.conf for all options you can put in your schroot for your specific chroot. Take a close look at the users= option.

man schroot.conf

UPDATE: Ubuntu x86_64 Bionic & Focal Fossa (chroot)

Apparently the wine that is from the ubuntu repository conflict each other (wine32 vs. wine64)
to fix this, I uninstall wine32. sudo apt remove wine32. Rightnow I am unable to run the x86 apps but now winecfg works. I also fix the X server display using this command DISPLAY=:0 winecfg
I don't know how to fix this permanently. Therefore DISPLAY=:0 has to be included when you want to run winecfg. Just ignore the warning about wine32 is not installed.

Screenshot_2020-07-03_17-53-32

I also want to report that winetricks also works using the same command to enable the GUI: DISPLAY=:0 winetricks

Screenshot_2020-07-03_17-59-06

The same way for playonlinux, if you got a display error, use this command: DISPLAY=:0 playonlinux

Screenshot_2020-07-03_18-07-03

1 Like

This is some nice progress. :slight_smile:

When it's all done and working, do you mind writing up a tutorial on how you did it all? :slight_smile:

that's my goal in the end

1 Like

Nice work, we need to see What all will work on it.

Thanks for reporting it on here.

Actually, I want to try if sketchup 2018 will run smoothly in Manjaro Arm. But, I don't have Panfrost activated yet. So Sad!

Yes your device doesn't have panfrost support yet, maybe you can do a write up of this and someone with other sbc and gpu driver can try it and see if it works.

Thanks.

Here's my update. It seems the current hurdle is how to get wine32 from the foreign i386 working with the wine64. I can confirm that the error is caused by wine32. Here's what I did:

  1. If I remove the wine32, wine works perfectly. But I cannot install x86_64 apps because it needs some wine32:i386 libraries.

  2. If I remove wine64, then type wine --version I got this message: bash: /usr/bin/wine: No such file or directory. To fix this I installed multilib like what is suggested in the forum https://www.linuxquestions.org/questions/linux-software-2/error-when-trying-to-run-wine-usr-bin-wine-no-such-file-or-directory-787683/ . Then when I exit and enter chroot and type wine --version this problem occurs: bash: wine: command not found Sounds promising right?
    However when I install wine / wine64 again. the /usr/bin/wine: 40: exec: /usr/lib/wine/wine: not found comes back

  3. I also tried to install wine via winehq:

sudo dpkg --add-architecture i386

wget -O - https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -

sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main'

sudo apt update

sudo apt install --install-recommends winehq-stable

when I type wine --version I got this message: bash: /usr/bin/wine: No such file or directory

I tried:

sudo apt install gcc-multilib

sudo apt-get install --reinstall libc6-i386
source: https://ubuntuforums.org/showthread.php?t=1846286

but the still got the same problem bash: /usr/bin/wine: No such file or directory

Winetricks does a great job even I managed to install corenfonts successfully. But because I deleted the wine32, package like vcrun2013, vcrun2015, dotnet425 do not want to install because of missing wine32. Unless we fix the wine32 problem, winetricks cannot work perfectly.

I managed to install wine 5.11 stable x86 and x64 via playonlinux. However I got crash when trying to open wine configure

Screenshot_2020-07-04_08-37-06

ok thanks for this useful manual

It's ok

I want to confirm that this problem occurs in debian jessie, debian buster, ubuntu bionic & ubuntu focal X86_64 using wine from official repo:

maybe someone could help to debug this:

(ubuntu-x64)root@rna:~# wine --version
/usr/bin/wine: 40: exec: /usr/lib/wine/wine: not found
(ubuntu-x64)root@rna:~# file /usr/bin/wine
/usr/bin/wine: symbolic link to /etc/alternatives/wine
(ubuntu-x64)root@rna:~# file /usr/lib/wine/wine
/usr/lib/wine/wine: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, BuildID[sha1]=1da663b808b12609a035b00e4e49165530622e6d, for GNU/Linux 3.2.0, stripped
(ubuntu-x64)root@rna:~# ldd /usr/bin/wine
/usr/bin/ldd: line 160: /lib/ld-linux.so.2: No such file or directory
not a dynamic executable

It think the problem is not that files are missing, it is again a problem of running a binary on the wrong architecture. The error messages for this problem are really misleading.

A Intel or AMD 64 bit CPU is backwards compatible to run 32 bit x86-* binaries. But this is a function of these CPU's. This is intentional build in, a real only 64 bit CPU can't do that.

But your chroot is using a 64 Bit software "CPU" (qemu-x86_64-static). I believe these software CPU can't run a 32 bit binary.

I'm not sure if you can simply put in the qemu-i386-static binary. Or if you can only run a 64bit wine prefix in a 64 bit chroot environment. But can you even install 32 bit Windows software in a 64 bit wine prefix? I really have no experience with wine.

This is interesting to try.

Yes, I am using wine32 bit Windows Software in a 64 bit wine prefix using Linux Mint in x64 both AMD and Intel CPU. Therefore I'm very confident that this can be solved via software fix.

UPDATE 2: Ubuntu x86 Bionic (chroot)

I managed to run Xterm successfully:
Screenshot_2020-07-05_10-26-28

and also notepad:
Screenshot_2020-07-05_10-27-47

and successfully installed Notepad++ x86:
Screenshot_2020-07-05_10-18-21

I can also run notepad++ zip edition (portable):
Screenshot_2020-07-05_10-39-02

Even I managed to install and run my favorite game "Typer Shark". But because I don't have panfrost working. The In game performance with my setting shown in the picture is kind of playable (not that bad), but it doesn't run in Full Screen:

Screenshot_2020-07-05_11-28-30

Screenshot_2020-07-05_11-51-20

Screenshot_2020-07-05_11-30-08

From my observation, it seems installing an x86 apps is easy for portable application or application that does not need dependencies. However, if it is an application that needs some dependencies from winetricks that would be troublesome. As winetricks in x86 is super slow. But I can verify that winetricks is very fast in x86_64. However, the hurdle is in Wine32 binaries as I mentioned earlier.

I could say that running wine in x86 chroot environment is "almost" perfect for portable applications or application that does not require external dependencies.

UPDATE 2: Ubuntu x86_64 Bionic & Focal Fossa (chroot)

@xabbu: You nailed it down man!!!! I can confirm your suggestion 100% works. Now wine works perfectly in x86_64 chroot environment.

Screenshot_2020-07-05_16-57-07

Winecfg finally works perfectly in x86_64:

Screenshot_2020-07-05_17-21-26

Now Winetricks is working:

Screenshot_2020-07-05_17-45-39

I am so happy after days of struggle. The solution is simply copying the i386 qemu in the folder. So basically now I have both qemu-x86_64-static and qemu-i386-static in the chroot /usr/bin. That's the secret. :innocent: :innocent: :innocent:

2 Likes

Amazing.

Now try to install office suite and see if that works. :stuck_out_tongue_closed_eyes:

If it does then a tutorial is expected from all your hard work.

Great work.

1 Like

UPDATE 3: Ubuntu x86_64 Bionic & Focal Fossa (chroot)

I can confirm that 32bit game can be played in x86_64 chroot with faster performance even without panfrost support. @xabbu: to answer your doubt earlier, here's the result:

Screenshot_2020-07-06_17-38-02

That would take time to figure out many dependencies. I'll try my best

1 Like

UPDATE 4: Ubuntu x86_64 Bionic(chroot)

Finally I managed to successfully install Sketchup via PlayOnLinux 4.3.4, after many unsuccessful attempts using wine and winetricks. However, the moment I open it crashes.
All dependencies are satisfied. Just to let you know installing dependencies is really hard via winetricks. It often crashes and never get the job done.

This is the POL I am using:

Screenshot_2020-07-09_20-16-31

This image shows the crash in sketchup 8

Screenshot_2020-07-09_23-37-22

I also managed to install Sketchup 7.1 in the same virtual drive:

Screenshot_2020-07-09_23-44-57

Even I managed to see the splash screen, but cannot click anything inside sketchup then it crashes (at least I can see that there might be a "hope")

Screenshot_2020-07-10_00-01-01

Here's what the debug says:

te: 07/09/20 16:12:56

> PlayOnLinux Version
  4.3.4
> uname -a
  Linux rna 5.7.2-1-MANJARO-ARM #1 SMP PREEMPT Fri Jun 12 22:12:23 +03 2020 x86_64 x86_64 x86_64 GNU/Linux
> lsb_release -a
  
> wine --version
  wine-3.0.5
> POL_WINEVERSION
  3.0.5
> WINEPREFIX
  /home/rna/.PlayOnLinux//wineprefix/GoogleSketchUp8
> Distribution
  Ubuntu 18.04 LTS
> glxinfo \| grep rendering
  direct rendering: Yes
> glxinfo \| grep renderer
      GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer, 
    GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer, 
Extended renderer info (GLX_MESA_query_renderer):
OpenGL renderer string: llvmpipe (LLVM 6.0, 128 bits)
> OpenGL libs (Direct rendering testing)
  32bits direct rendering is enabled
  64bits direct rendering is enabled

[07/09/20 16:21:31] - Running wine-3.0.5 cmd /c echo %ProgramFiles% (Working directory : /usr/share/playonlinux/python)
C:\Program Files
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
[07/09/20 16:22:30] - Running wine-3.0.5 regedit /home/rna/.PlayOnLinux//tmp/regkey.reg (Working directory : /usr/share/playonlinux/python)
[07/09/20 16:22:30] - Content of /home/rna/.PlayOnLinux//tmp/regkey.reg
-----------
REGEDIT4

[HKEY_CURRENT_USER\Software\Wine\Direct3D]
"OpenGL"="enabled"
-----------
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
[07/09/20 16:24:44] - Running wine-3.0.5 start /unix /home/rna/Downloads/Trimble SketchUp Pro 8/SketchUpProWEN.exe (Working directory : /home/rna)
0034:fixme:mscoree:get_runtime_info unsupported startup flags 6
0034:fixme:mscoree:get_runtime_info unsupported runtimeinfo flags 18
0032:fixme:ntdll:NtLockFile I/O completion on lock not implemented yet
0032:fixme:msi:event_spawn_wait_dialog doing nothing
0032:fixme:msi:internal_ui_handler internal UI not implemented for message 0x0b000000 (UI level = 5)
0032:fixme:msi:internal_ui_handler internal UI not implemented for message 0x0b000000 (UI level = 5)
0032:err:msi:free_package_structures failed to delete L"C:\\users\\rna\\Temp\\msi2b39.tmp" (5)
[07/09/20 16:32:49] - Running wine-3.0.5 regedit.exe RegModif.reg (Working directory : /home/rna)
wine client error:1e: write: Bad file descriptor
[07/09/20 16:33:32] - Running wine-3.0.5 regedit /home/rna/.PlayOnLinux//tmp/VGA_ID_fix.reg (Working directory : /home/rna)
[07/09/20 16:33:32] - Content of /home/rna/.PlayOnLinux//tmp/VGA_ID_fix.reg
-----------
REGEDIT4

[HKEY_CURRENT_USER\Software\Wine\Direct3D]
"VideoPCIVendorID"=dword:0000
"VideoPCIDeviceID"=dword:0000
"VideoDriver"="vga.dll"
-----------
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
[07/09/20 16:34:18] - Running wine-3.0.5 winepath -u C:\\users\\rna\\Desktop (Working directory : /home/rna)
/home/rna/.PlayOnLinux//wineprefix/GoogleSketchUp8/dosdevices/c:/users/rna/Desktop
wine client error:2d: write: Bad file descriptor
[07/09/20 16:36:08] - Running wine-3.0.5 SketchUp.exe (Working directory : /home/rna/.PlayOnLinux/wineprefix/GoogleSketchUp8/drive_c/Program Files/Google/Google SketchUp 8)

Intrinsic Alchemy v3.3 Beta-0702 (Dynamic/Release)
Built by <unknown> on Fri Jul 2 00:00:00 2010

wine client error:32: read: Bad address
wine client error:32: read: Bad address
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
[07/09/20 16:37:58] - Running wine-3.0.5 SketchUp.exe (Working directory : /home/rna/.PlayOnLinux/wineprefix/GoogleSketchUp8/drive_c/Program Files/Google/Google SketchUp 8)

Intrinsic Alchemy v3.3 Beta-0702 (Dynamic/Release)
Built by <unknown> on Fri Jul 2 00:00:00 2010

[07/09/20 16:40:13] - Running wine-3.0.5 /home/rna/Downloads/Google Sketchup 7.1/GoogleSketchUpProWEN 7.1.exe (Working directory : /)
0031:fixme:mscoree:get_runtime_info unsupported startup flags 6
0031:fixme:mscoree:get_runtime_info unsupported runtimeinfo flags 18
0033:fixme:mscoree:get_runtime_info unsupported startup flags 6
0033:fixme:mscoree:get_runtime_info unsupported runtimeinfo flags 18
002f:fixme:ntdll:NtLockFile I/O completion on lock not implemented yet
002f:err:richedit:ReadStyleSheet skipping optional destination
002f:err:richedit:ReadStyleSheet skipping optional destination
002f:fixme:msi:event_spawn_wait_dialog doing nothing
002f:fixme:msi:internal_ui_handler internal UI not implemented for message 0x0b000000 (UI level = 5)
002f:fixme:msi:internal_ui_handler internal UI not implemented for message 0x0b000000 (UI level = 5)
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
[07/09/20 16:54:39] - Running wine-3.0.5 winepath -u C:\\users\\rna\\Desktop (Working directory : /home/rna/.PlayOnLinux/wineprefix/GoogleSketchUp8/drive_c)
wine client error:2d: read: Bad address
[07/09/20 16:55:55] - Running wine-3.0.5 SketchUp.exe (Working directory : /home/rna/.PlayOnLinux/wineprefix/GoogleSketchUp8/drive_c/Program Files/Google/Google SketchUp 7)

Intrinsic Alchemy  v3.2 Beta-0902 (Dynamic/Release) 
Built by on Wed Sep 2 13:45:53 MDT 2009

wine client error:7fffffff: init_thread failed with status 103
rpc_transport.c:428: rpcrt4_conn_np_write: Assertion `io_status.Information == count' failed.
wine client error:1f: read: Bad address
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
[07/09/20 16:57:06] - Running wine-3.0.5 SketchUp.exe (Working directory : /home/rna/.PlayOnLinux/wineprefix/GoogleSketchUp8/drive_c/Program Files/Google/Google SketchUp 7)

Intrinsic Alchemy  v3.2 Beta-0902 (Dynamic/Release) 
Built by on Wed Sep 2 13:45:53 MDT 2009

threadpool.c:2035: tp_object_release: Assertion `!object->num_pending_callbacks' failed.
wine client error:36: write: Bad file descriptor
wine client error:3f: wine client error:3f: read: Bad address
read: Bad address
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
[07/09/20 16:58:33] - Running wine-3.0.5 SketchUp.exe (Working directory : /home/rna/.PlayOnLinux/wineprefix/GoogleSketchUp8/drive_c/Program Files/Google/Google SketchUp 7)

Intrinsic Alchemy  v3.2 Beta-0902 (Dynamic/Release) 
Built by on Wed Sep 2 13:45:53 MDT 2009

qemu: uncaught target signal 11 (Segmentation fault) - core dumped
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
[07/09/20 17:00:01] - Running wine-3.0.5 SketchUp.exe (Working directory : /home/rna/.PlayOnLinux/wineprefix/GoogleSketchUp8/drive_c/Program Files/Google/Google SketchUp 7)

Intrinsic Alchemy  v3.2 Beta-0902 (Dynamic/Release) 
Built by on Wed Sep 2 13:45:53 MDT 2009

wine client error:37: write: Bad file descriptor
wine client error:3a: write: Bad file descriptor
wine client error:3c: wine client error:3d: qemu: uncaught target signal 11 (Segmentation fault) - core dumped
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
[07/09/20 17:14:07] - Running wine-3.0.5 SketchUp.exe (Working directory : /home/rna/.PlayOnLinux/wineprefix/GoogleSketchUp8/drive_c/Program Files/Google/Google SketchUp 7)

Intrinsic Alchemy  v3.2 Beta-0902 (Dynamic/Release) 
Built by on Wed Sep 2 13:45:53 MDT 2009

wine client error:37: read: Bad file descriptor
wine client error:35: write: Bad file descriptor
wine client error:3c: read: Bad address
wine client error:3c: read: Bad address
wine client error:3f: read: Bad file descriptor
wine client error:40: 
[07/09/20 17:15:18] - Running wine-3.0.5 SketchUp.exe (Working directory : /home/rna/.PlayOnLinux/wineprefix/GoogleSketchUp8/drive_c/Program Files/Google/Google SketchUp 7)

Intrinsic Alchemy  v3.2 Beta-0902 (Dynamic/Release) 
Built by on Wed Sep 2 13:45:53 MDT 2009

wine client error:44: read: Bad address
[07/09/20 17:19:41] - Running wine-3.0.5 SketchUp.exe (Working directory : /home/rna/.PlayOnLinux/wineprefix/GoogleSketchUp8/drive_c/Program Files/Google/Google SketchUp 7)

Intrinsic Alchemy  v3.2 Beta-0902 (Dynamic/Release) 
Built by on Wed Sep 2 13:45:53 MDT 2009

[07/09/20 17:23:00] - Running wine-3.0.5 SketchUp.exe (Working directory : /home/rna/.PlayOnLinux/wineprefix/GoogleSketchUp8/drive_c/Program Files/Google/Google SketchUp 7)

Intrinsic Alchemy  v3.2 Beta-0902 (Dynamic/Release) 
Built by on Wed Sep 2 13:45:53 MDT 2009

wine client error:37: write: Bad file descriptor
[07/09/20 17:24:09] - Running wine-3.0.5 SketchUp.exe (Working directory : /home/rna/.PlayOnLinux/wineprefix/GoogleSketchUp8/drive_c/Program Files/Google/Google SketchUp 7)
0054:fixme:actctx:parse_depend_manifests Could not find dependent assembly L"Microsoft.VC80.MFCLOC" (8.0.50608.0)
0054:fixme:wininet:InternetSetOptionW INTERNET_OPTION_SEND/RECEIVE_TIMEOUT/DATA_SEND_TIMEOUT 30000
0054:fixme:wininet:InternetSetOptionW INTERNET_OPTION_SEND/RECEIVE_TIMEOUT/DATA_SEND_TIMEOUT 30000
0054:fixme:wininet:InternetSetOptionW INTERNET_OPTION_CONNECT_RETRIES 0
0054:fixme:msvcrt:type_info_name_internal_method type_info_node parameter ignored

Intrinsic Alchemy  v3.2 Beta-0902 (Dynamic/Release) 
Built by on Wed Sep 2 13:45:53 MDT 2009

0054:fixme:ieframe:PersistStreamInit_InitNew (0x151a80)
0054:fixme:ieframe:navigate_url Unsupported args (Flags 0x32f1a0 {VT_I4: 4}; TargetFrameName 0x32f1b0 {VT_BSTR: (null)})
0054:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0054:fixme:ieframe:WebBrowser_Stop (0x151a80)
0054:fixme:ieframe:navigate_url Unsupported args (Flags 0x32f7b0 {VT_I4: 4}; TargetFrameName 0x32f7c0 {VT_BSTR: (null)})
0054:fixme:dwmapi:DwmIsCompositionEnabled 0xf563018
005c:fixme:iphlpapi:NotifyIpInterfaceChange (family 0, callback 0xc05b608, context 0x27746e8, init_notify 0, handle 0xfb9fc88): stub
0054:fixme:msctf:ThreadMgrSource_AdviseSink (0x3792358) Unhandled Sink: {71c6e74e-0f28-11d8-a82a-00065b84435c}
0054:fixme:imm:ImmGetDescriptionW (0x4090409, (nil), 0): semi stub
0054:fixme:imm:ImmGetDescriptionW (0x4090409, 0x116b52a8, 9): semi stub
0054:fixme:imm:ImmGetOpenStatus (0x3794de8): semi-stub
0054:fixme:imm:ImmReleaseContext (0x101a4, 0x3794de8): stub
006a:err:ntdll:RtlpWaitForCriticalSection section 0x27735d0 "?" wait timed out in thread 006a, blocked by 0054, retrying (60 sec)
[07/09/20 17:26:49] - Running wine-3.0.5 SketchUp.exe (Working directory : /home/rna/.PlayOnLinux/wineprefix/GoogleSketchUp8/drive_c/Program Files/Google/Google SketchUp 7)
0009:fixme:actctx:parse_depend_manifests Could not find dependent assembly L"Microsoft.VC80.MFCLOC" (8.0.50608.0)
0009:fixme:wininet:InternetSetOptionW INTERNET_OPTION_SEND/RECEIVE_TIMEOUT/DATA_SEND_TIMEOUT 30000
0009:fixme:wininet:InternetSetOptionW INTERNET_OPTION_SEND/RECEIVE_TIMEOUT/DATA_SEND_TIMEOUT 30000
0009:fixme:wininet:InternetSetOptionW INTERNET_OPTION_CONNECT_RETRIES 0
0009:fixme:msvcrt:type_info_name_internal_method type_info_node parameter ignored

Intrinsic Alchemy  v3.2 Beta-0902 (Dynamic/Release) 
Built by on Wed Sep 2 13:45:53 MDT 2009

0009:fixme:ieframe:PersistStreamInit_InitNew (0x151b60)
0009:fixme:ieframe:navigate_url Unsupported args (Flags 0x32f1a0 {VT_I4: 4}; TargetFrameName 0x32f1b0 {VT_BSTR: (null)})
0009:fixme:urlmon:InternetBindInfo_GetBindString not supported string type 20
0038:err:seh:raise_exception Exception frame is not in stack limits => unable to dispatch exception.
wine client error:30: read: Bad address
001e:err:seh:raise_exception Unhandled exception code c0000005 flags 0 addr 0x7ef834f6
001e:err:seh:raise_exception Unhandled exception code c0000005 flags 0 addr 0x7ef7af9e
wine client error:1e: write: Bad file descriptor

Dear All,

Testing wine in chroot environment takes time. And I don't have that luxury. So maybe somebody could help us to test it. I will post what I did so far. If you follow exactly what I did. You don't need to put yourself into trouble.

Important Note:
I have tested:

  • Debian Stretch x86 and x86_64
  • Debian Buster x86 and x86_64
  • Ubuntu Bionic x86 and x86_64
  • Ubuntu Focal x86 and x86_64

I will highlight that you should stick with Ubuntu Bionic x86_64 as it works best, and most winetricks works. But for some it doesn't. But it is better compared to the rest of what I tested.

OK Let's start:

PREPARATION:
Before we start, make sure that Binfmt_misc is compiled in your kernel. If it is not, then you cannot continue this procedure.

$ zcat /proc/config.gz | grep BINFMT_MISC

Make sure that you had installed the base-devel package, Thanks to @Lolix to point it out:

$ sudo pacman -Syyu base-devel --needed

Now Let's install the required package first:

$ yay -S qemu-user-static schroot debootstrap

Now let's install the configuration file for qemu, Thanks to @xabbu for the fix.

$ wget https://raw.githubusercontent.com/qemu/qemu/master/scripts/qemu-binfmt-conf.sh
$ sudo bash qemu-binfmt-conf.sh --systemd i386
$ sudo bash qemu-binfmt-conf.sh --systemd x86_64
$ ls /etc/binfmt.d/

Make sure that you got two files in the folder /etc/binfmt.d/
qemu-i386.conf
qemu-x86_64.conf

Now let's check the status:

$ /usr/lib/systemd/systemd-binfmt --cat-config --no-pager

Now let's edit the qemu-i386.conf because the config is not correct:

$ sudo nano /etc/binfmt.d/qemu-i386.conf

Now replace nearly at the end of the line :/usr/local/bin/qemu-i386: with :/usr/bin/qemu-i386-static:
Then ctrl+x, yes and save

We have to edit the qemu-x86_64.conf as well:

$ sudo nano /etc/binfmt.d/qemu-x86_64.conf

Now replace nearly at the end of the line :/usr/local/bin/qemu-x86_64: with :/usr/bin/qemu-x86_64-static:
Then ctrl+x, yes and save

Now let's restart and check our binfmt status:

$ systemctl restart systemd-binfmt
$ systemctl status systemd-binfmt --no-pager

INSTALLING UBUNTU BIONIC x86_64 (DEBOOTSTRAP)
If you follow step by step the procedure above, then you should be OK to run the following step. If not, go back to the Preparation procedure:

In this procedure we will debootstrap the ubuntu bionic x86_64 in the folder /srv/chroot/ubuntu-x64. If you deviate from this, then you are on your own. You will get trouble when installing winetricks, etc. As I mentioned earliar. At the moment I am writing this, ubuntu bionic x86_64 is the best option:

$ sudo mkdir /srv/chroot/ubuntu-x64
$ sudo debootstrap --arch amd64 --foreign bionic /srv/chroot/ubuntu-x64 http://archive.ubuntu.com/ubuntu/
$ sudo cp /usr/bin/qemu-i386-static /srv/chroot/ubuntu-x64/usr/bin
$ sudo cp /usr/bin/qemu-x86_64-static /srv/chroot/ubuntu-x64/usr/bin
$ sudo chroot "/srv/chroot/ubuntu-x64" /debootstrap/debootstrap --second-stage

If everything runs smoothly, then let's continue:

$ sudo nano /etc/schroot/chroot.d/ubuntu-x64.conf

Now add this following text, change username with your own user name:

[ubuntu-x64]
description=Ubuntu Bionic x86_64 chroot
aliases=ubuntu-x64
type=directory
directory=/srv/chroot/ubuntu-x64
profile=desktop
personality=linux
preserve-environment=true
root-users=<username>
users=<username>

Then ctrl+x, yes and save

Now lets fix the database issue:

$ sudo nano /etc/schroot/desktop/nssdatabases

then put # in font of networks, group, passwd and add #user. It should look like this:

# System databases to copy into the chroot from the host system.
#
# <database name>
#passwd
shadow
#group
gshadow
services
protocols
#networks
#hosts
#user

Then ctrl+x, yes and save

Now let's fix the stateoverride issue:

$ sudo nano /srv/chroot/ubuntu-x64/var/lib/dpkg/statoverride

change the first crontab and the first messagebus with root, it should look like this:

root root 2755 /usr/bin/crontab
root root 4754 /usr/lib/dbus-1.0/dbus-daemon-launch-helper

Then ctrl+x, yes and save

Now, you can start chrooting into ubuntu:

$ sudo schroot -c ubuntu-x64
$ cd
$ sudo apt install nano
$ sudo nano ~/.bashrc

then add this line in the bottom:

export LANGUAGE=”C”
export LC_ALL=”C”
export DISPLAY=:0

Then ctrl+x, yes and save

Now let's restart our chroot, by exit

$ exit

INSTALL UBUNTU REPOSITORY (INSIDE CHROOT ENVIRONMENT):

$ sudo schroot -c ubuntu-x64
$ cd
$ sudo apt install software-properties-common wget build-essential
$ sudo add-apt-repository universe
$ sudo add-apt-repository multiverse
$ sudo add-apt-repository restricted 
$ sudo apt update && sudo apt upgrade
$ exit

INSTALL WINE & WINETRICKS (INSIDE CHROOT ENVIRONMENT):

$ sudo schroot -c ubuntu-x64
$ cd
$ sudo dpkg --add-architecture i386
$ sudo apt update
$ sudo apt install libxml2-dev:i386
$ sudo apt install wine-development
$ wine --version
$ sudo apt install winetricks
$ sudo apt install zenity
$ sudo apt install winbind
$ sudo apt install nemo
$ exit

INSTALL PLAYONLINUX (INSIDE CHROOT ENVIRONMENT):

$ sudo schroot -c ubuntu-x64
$ cd
$ wget -q "http://deb.playonlinux.com/public.gpg" -O- | sudo apt-key add -
$ sudo wget http://deb.playonlinux.com/playonlinux_bionic.list -O /etc/apt/sources.list.d/playonlinux.list
$ sudo apt update
$ sudo apt install playonlinux
$ exit

Now let's check our ID first:

$ id

ADDING A USER (INSIDE CHROOT ENVIRONMENT):

$ sudo schroot -c ubuntu-x64
$ adduser <username>
$ su - <username>
$ nano ~/.bashrc

add this text in the bottom:

export LANGUAGE=”C”
export LC_ALL=”C”
export DISPLAY=:0

Then ctrl+x, yes and save

Now let's exit:

$ exit

CONFIGURING WINE & WINETRICKS (INSIDE CHROOT ENVIRONMENT):

$ sudo schroot -c ubuntu-x64
$ su - <username>
$ winecfg
$ winetricks
$ exit

INSTALLING .deb Package (INSIDE CHROOT ENVIRONMENT):

$ sudo schroot -c ubuntu-x64
$ sudo dpkg -i <the-location-of-the-deb-package>
$ exit

Once you are done, you can create a shortcut in the desktop running as your username

Nemo Launcher

schroot -c ubuntu-x64 nemo

Other apps:

schroot -c ubuntu-x64 /opt/the/location/of/your/app

With this process, now you should be able to run x86_64 *.deb and install a wine app.

WARNING:
Follow the procedure step by step. Other wise you'll get into trouble.

Hope this might help somebody out there.
Thanks to @Lolix and @xabbu for helping.

I also urge you to post your result with wine to help other.

Many Thanks,
RNA

1 Like

Forum kindly sponsored by