Categories

# Box86/Box64 are easy to use

Discover how box86 & box64 are easy to use and install, and how they can be integrated in the system.

I think the ease of use and how simple both box86 and box64 are to install is often forgotten. So let me detail a bit what is needed to have either box running:
For box86, you need the box86 binary, and a 32bits subsystem.
For box64, you need the box64 binary, and a 64bits subsystem.

And that it. Everything else is “quality of life” addons.
The installation to the system, using systemd-binfmt integration, allows box86/box64 to be used automatically by the system when an i386/x86_64 binary is launched. But that’s not mandatory.
If it is not installed (or if systemd-binfmt is not available), box can still be used. For example, once built (that part is covered in the COMPILE.md doc from each repo) on the Pandora (no systemd there), world of goo can be launched using

box86 ./WorldOfGoo.bin32

The other things that come with both box and are installed are a small set of libraries. There is libstdc++ and its companion libgcc_s. There is also libpng12 now. That last one is here because quite a lot of games are still using it, while it’s deprecated and removed from modern OS version. It’s here so games can still be run.
For the C++ library, well, box86 and box64 don’t wrap C++ library (for technical reasons). So those libs need to be the i386/x86_64 version to run C++ software (so, a lot of softwares!). Those libs are copied in a fixed path on the system so box can find and use them. But again, it’s not mandatory. C++ games can still be launched if the libraries are copied somewhere box can find them, like in the game folder itself.

For all libraries used by a game or software, box will try to load the native version if that libs is wrapped (32bits for box86 or 64bits for box64). If the lib is not loaded (not wrapped or not found), box will try to load an emulated version of that lib (in the current folder, a few subfolders, or in a folder indicated by either LD_LIBRARY_PATH or BOXxx_LD_LIBRARY_PATH environment variable). If the lib is still not loaded, an error will occur…

To use Windows software, you will need an i386 or x86_64 version of wine. It is easier to use pre-built binary. You can find some in the PlayOnLinux build machine, or in the TwisterOS FAQ page for example. Once you have a tgz of the binary, simply extract it in your home folder (so ~/wine), then create a few shortcuts to launch it with
sudo ln -s ~/wine/bin/wine /usr/local/bin/wine
sudo ln -s ~/wine/bin/wineserver /usr/local/bin/wineserver
sudo ln -s ~/wine/bine/wineboot /usr/local/bin/wineboot
If you grabbed an 64bits built, you also have to add
sudo ln -s ~/wine/bin/wine64 /usr/local/bin/wine64

You can also install winetricks, just follow the procedure on its GitHub page, and it should just work out-of-the-box with the latest versions of box86 and box64.

Now, just launch your Windows games with wine, as if you were on an x86 pc…

Because the wrapping is an integral part of box, there is no specific file or configuration to define what/how libs are wrapped. And there is more than a hundred libs that are actually wrapped. That means that, in most cases, when a lib is missing, you just need to install the native one for your system.

When using box86 on an Aarch64 OS, it can be a bit tricky. For the Debian family, you can use multiarch, for a seamless system integration. Start with
sudo dpkg add-architecture armhf
sudo apt update

to add the architecture. Then, to kickstart your library collection, you can use
sudo apt install libgtk2.0-0:armhf libsdl2-image-2.0-0:armhf
To install gtk2 (which also installs many X11 libs) and some SDL2 libs for armhf. That should allow a good set of 32bits program to start.

To conclude, I’ll show here the list of library wrapped by box86 and box64.

crashhandler.so         => empty wrapping
d3dadapter9.so.1        => box86 only (that's gallium9)
ld-linux-x86-64.so.2 / ld-linux.so.2
libalure.so.1
libalut.so.0
libopenal.so.1 / libopenal.so.0 / libopenal.so / openal.so
libasound.so.2
libbz2.so.1
libc.so.6
libcairo.so.2
libcups.so.2
libcurl.so.3
libcurl.so.4
libcurl-gnutls.so.4
libcrypto.so.1      => emulated is prefered
libdbus-1.so.3
libcrypt.so.1
libdl.so.2
libdrm.so.2
libect-2.0.so.0
libexpat.so.1 / libexpat.so
libFAudio.so.0  => box64 only
libFLAC.so.8
libfontconfig.so.1
libform.so.5
libformw.so.5
libfreetype.so.6
libGL.so.1 / libGL.so / libOpenGL.so.0
libGLU.so.1
libgmp.so.10    => box64 only
libgnutls.so.30
libgssapi.so.3      => box64 only
libgssapi_krb5.so.2
libICE.so.6
libiconv.so.2       => box86 only
libjpeg.so.8        => box86 only
libjpeg.so.62       => box86 only
libkrb5.so.3
libldap_r-2.4.so.2
liblber-2.4.so.2
liblzma.so.5
libm.so.6
libmpg123.so.0
libncurses.so.5
libncurses.so.6
libncursesw.so.5
libncursesw.so.6
libnsl.so.1
libnspr4.so
libnss3.so
libnssutil3.so
libogg.so.0
libpanel.so.5
libpangoft2-1.0.so / libpangoft2-1.0.so.0
libpci.so.3     => box64 only
libpcre.so.3
libplc4.so
libplds4.so
libpng12.so.0       => box86 only
libpng16.so.16
libpulse-simple.so.0    => can be disable with BOXxx_NOPULSE=1
libpulse.so.0           => can be disable with BOXxx_NOPULSE=1
libresolv.so.2
librt.so.1
libSDL-1.2.so.0
libSDL_image-1.2.so.0
libSDL_mixer-1.2.so.0
libSDL_net-1.2.so.0
libSDL_sound-1.0.so.1
libSDL_ttf-2.0.so.0
libSDL2-2.0.so.0 / libSDL2-2.0.so.1 / libSDL2.so / libsdl2-2.0.so.0
libSDL2_image-2.0.so.0 / libSDL2_image.so
libSDL2_mixer-2.0.so.0
libSDL2_net-2.0.so.0
libSDL2_ttf-2.0.so.0 / libSDL2_ttf.so
libselinux.so.1 => box64 only
libsecret-1.so.0
libSM.so.6
libsmime3.so
libsmpeg-0.4.so.0
libsmpeg2-2.0.so.0
libsndfile.so.1
libssl.so.1         => emulated is prefered
libssl3.so
libtcmalloc_minimal.so.4    => empty wrapping
libtinfo.so.5
libtinfo.so.6
libturbojpeg.so.0       => box86 only
libudev.so.0
libudev.so.1
libusb-1.0      => box86 only
libutil.so.1
libuuid.so.1
libv4l2.so.0    => box86 only
libvorbis.so.0
libvorbisfile.so.3
libvulkan.so.1 / libvulkan.so
libwayland-client.so        => box86 only
libX11.so.6
libX11-xcb.so.1
libXau.so.6
libxcb.so.1
libxcb-dri2.so.0
libxcb-dri3.so.0
libxcb-glx.so.0
libxcb-image.so.0
libxcb-keysyms.so.1
libxcb-present.so       => box86 only
libxcb-randr.so.0
libxcb-shape.so.0
libxcb-shm.so.0
libxcb-xtest.so.0
libxcb-xfixes.so.0
libXcomposite.so.1
libXcursor.so.1
libXdamage.so.1
libXdmcp.so.6
libXext.so.6
libXfixes.so.3
libXft.so.2
libXi.so.6
libXinerama.so.1
libxkbcommon.so.0
libxkbcommon-x11.so.0
libxml2.so.2
libXmu.so.6
libXpm.so.4
libXrandr.so.2
libXrender.so.1
libxslt.so.1
libXss.so.1
libXt.so.6
libXtst.so.6
libXxf86vm.so.1
libz.so.1
//Those are GTK one and can be disabled with BOXxx_NOGTK=1
libappindicator.so.1        => box86 only
libatk-1.0.so.0
libatk-bridge-2.0.so.0
libatspi.so.0       => box64 only
libdbus-glib-1.so.2
libdbusmenu-glib.so     => box86 only
libdbusmenu-gtk.so      => box86 only
libgconf-2.so.4
libgdk-3.so     => box86 only
libgdk-x11-2.0.so.0
libgdk_pixbuf-2.0.so.0
libgio-2.0.so.0
libglib-2.0.so.0
libgmodule-2.0.so.0
libgobject-2.0.so.0
libgstapp-1.0.so.0
libgstaudio-1.0.so.0
libgstbase-1.0.so.0
libgstinterfaces-0.10       => box86 only
libgstreamer-0.10       => box86 only
libgstreamer-1.0.so.0
libgsttag-1.0.so.0
libgstvideo-1.0.so.0
libgtk-3.so     => box86 only
libgtk-x11-2.0.so.0
libgudev-1.0        => box86 only
liblcms2.so.2       => box86 only
libnm.so.0          => box86 only
libnm-glib.so       => box86 only
libnm-util.so       => box86 only
libpango-1.0.so.0
libpango-cairo-1.0.so.0


## 5 replies on “Box86/Box64 are easy to use”

AWsays:

Small typo: “64bits sybsystem”

AWsays:

Another small typo (or not exactly a typo): “box86 ./WorldOfGoo.bin32” (the first letter does not have bold font)

Otherwise great blog post and a video. Thanks for your work on this amazing project!

Thank you! I fixed the 2 typos.

stephanesays:

Another typo in:
sudo dpkd add-architecture armhf

dpkd -> dpkg

Fixed, thank you!