Skip to content

scout-on-soldier: Unpack our own Steam Runtime if necessary

Simon McVittie requested to merge wip/smcv/unpack-our-own-scout into master

This avoids game crashes in some of the unsupported configurations where a distribution or end user has either disabled the Steam Runtime with STEAM_RUNTIME=0, or switched to a modified, unofficial or otherwise out-of-band Steam Runtime with STEAM_RUNTIME=/some/path.

Normally, when developers and tinkerers are experimenting with new Steam Runtime versions, we can assume that they have previously run Steam with the supported runtime at least once. In that scenario, ~/.steam/root/ubuntu12_32/steam-runtime will be a valid scout runtime: it might not be the one the user intended, and it might be out of date, but it will probably work.

However, if someone has been consistently setting STEAM_RUNTIME ever since the first time they ran Steam, then it will never have had the opportunity to unpack the supported runtime, and ~/.steam/root/ubuntu12_32/steam-runtime will still be the heavily cut-down runtime from the bootstrapper, which is insufficient for launching games because it does not implement the whole Steam Runtime ABI (in particular, Dota 2 fails to launch because libpng12.so.12 is missing).

As before, developers and tinkerers can bypass all of this by setting STEAM_RUNTIME_SCOUT in addition to STEAM_RUNTIME. As with STEAM_RUNTIME, setting this variable is unsupported and users who have overridden it are responsible for the consequences (do not report bugs). We cannot reuse the same variable for this purpose, because of the dual role of STEAM_RUNTIME: it's a way for developers to switch to a different scout runtime, but it's also a way for libraries inside the runtime to detect the location of the runtime environment, which needs to be disabled while we are setting up the container runtime.


Avoids https://github.com/ValveSoftware/Dota-2/issues/2018 and similar issues.

I can reproduce a failure mode similar to that one on a FHS distribution as follows:

  • move ~/.steam/root/ubuntu12_32/steam-runtime elsewhere (I used ~/tmp/steam-runtime)
  • replace it with the ubuntu12_32/steam-runtime directory from /usr/lib/steam/bootstraplinux_ubuntu12_32.tar.xz
  • launch Steam with STEAM_RUNTIME=$HOME/tmp/steam-runtime in the environment
  • launch Dota 2

and I get the same error involving libpangoft2-1.0.so.

(Again, this is not a supported configuration: distributions and end users should not routinely set STEAM_RUNTIME to any value other than 1.)

Edited by Simon McVittie

Merge request reports

Loading