Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for forwarding commands into the container environment
Recent versions of the Steam Runtime include an IPC server/client pair which can be used to run commands inside the container environment (or any other special execution environment), analogous to sshd/ssh or flatpak-portal/flatpak-spawn. The server runs inside the Steam Runtime container and accepts commands over D-Bus; the client runs on the host system, asks the server to run a command, and forwards its stdin, stdout and stderr back to the host. https://gitlab.steamos.cloud/steamrt/steamlinuxruntime/-/merge_requests/72 adds support for injecting commands into the SteamLinuxRuntime_soldier compatibility tool (and any later version, such as sniper). However, Steam compatibility tools are stackable: in particular, Proton runs in a soldier container (or presumably sniper in future). If we are debugging a Proton game, then ideally we will want to inject commands into Proton's execution environment rather than soldier's, so that they run with the correct environment variables etc. to communicate with a running Proton session. In particular, it's important that the `WINEPREFIX` is correct. The intended "API" for this is that either the Steam client or a Steam user can set `$STEAM_COMPAT_LAUNCHER_SERVICE` to the Steam app-ID of the compatibility tool into which we want to inject commands, for example STEAM_COMPAT_LAUNCHER_SERVICE=1391110 to provide this debug interface for the soldier container, or STEAM_COMPAT_LAUNCHER_SERVICE=1887720 to provide this debug interface for Proton 7.0. For developer convenience, I've also made STEAM_COMPAT_LAUNCHER_SERVICE=container-runtime and STEAM_COMPAT_LAUNCHER_SERVICE=proton do the obvious thing. Wire this up to the Proton launch script, so that it can be used to run commands inside the Proton environment, with all of Proton's special environment variables set. Signed-off-by: Simon McVittie <smcv@collabora.com>
- Loading branch information