Jump to content

Steam in box86

From postmarketOS Wiki
Revision as of 03:41, 25 October 2024 by CalcProgrammer1 (talk | contribs)

THIS GUIDE IS A WORK IN PROGRESS, Use the Steam_in_FEX guide to run Steam for now.

This is a guide for setting up box86 and box64 inside of an Debian Distrobox container to run Steam games on arm64 devices.

box86/box64

box86 is an x86 emulator for arm32 Linux. box64 is an x86_64 emulator for arm64 Linux. Together, they can be used to run x86 and x86_64 applications on an arm64 Linux device. In the case of Steam, both 32- and 64-bit executables are used, and games can be either format, so we will need to set up a system with both box86 and box64 together. Because box86 runs purely in 32-bit mode, the host system needs a fairly complete arm32 system installed. The easiest way to do this is using Debian, as it has a full set of packages for both arm32 (armhf) and arm64 along with the ability to install both at the same time using multiarch. In order to use this setup on postmarketOS I will be using Distrobox to install a Debian arm64 image on top of postmarketOS that I can then enable the armhf architecture on and install the necessary libraries in both arm64 and armhf format.

Distrobox

Distrobox is a container manager designed to install and run persistent containers, optionally with root privileges and their own init system, on top of another distribution. It is available in postmarketOS. To install, simply run:

sudo apk add distrobox

Installing Debian image

Create the Debian Distrobox install by running:

distrobox create --image debian:latest --root

This will create a Debian container with root privileges. I tested with --init and without and the setup works either way, so I recommend not using --init as it adds unnecessary overhead.

Then you will need to enter the image by running:

distrobox enter --root debian-latest

This will go through the first-time setup which involves downloading all the packages and should eventually present you with a password prompt to create a password for your user account within the container. If it doesn't provide this prompt on the first run, run this command again and it should then give the password prompt.

After this, you should be inside of the Debian container.