Skip to content

Make launcher-service integration easier

Simon McVittie requested to merge wip/smcv/launcher-service into master
  • portal-listener: Factor out get_suggested_bus_name

    This will be used in launcher-service in the next commit.

  • launcher-service: Optionally show a hint about how to connect

    In the current prototypes, each compat tool is responsible for displaying a hint like this (if it wants to), but there are two problems with that:

    • each compat tool has to duplicate the code for finding a launch-client and suggesting how to launch it;
    • the compat tools can't know whether the service is providing multiple bus names via the --session option

    Move responsibility for this into the service.

  • bin: Add a simpler interface to wrap a game in the launcher-service

    If launcher-service is (mostly) mechanism, then this is policy. It uses argv[1] and $STEAM_COMPAT_LAUNCHER_SERVICE to decide whether to wrap a launcher-service around a game process. The idea is that Steam will set STEAM_COMPAT_LAUNCHER_SERVICE to the most appropriate layer of the stack at which to be inserting arbitrary debugging commands into a game.

    In previous prototypes, this was open-coded into each compat tool, but centralizing it is a lot easier for compat tool authors. Put a version in the name we use, to ensure that if we find we need to make breaking changes, we can rename to a new interface version (and optionally keep the old one around too).

    To minimize its startup time cost, this doesn't use GLib, only glibc.

  • launch-options: Simplify launcher-service integration

    We're now looking at using descriptive tool names like "proton" and "container-runtme", rather than app-IDs. Follow that here.


When we have a suitable version of steam-runtime-launcher-interface-0 in the PATH via SteamLinuxRuntime_soldier/soldier_platform_*/files, this will simplify the compat-tool integration down to something like this much-simplified version of the proton script:

THIS_COMPAT_TOOL = 'proton'

argv = ['wine', 'game.exe']    # or whatever

if shutil.which('steam-runtime-launcher-interface-0') is not None:
    argv = ['steam-runtime-launcher-interface-0', THIS_COMPAT_TOOL] + argv

os.execvp(argv[0], argv)

Backwards-compatible SteamLinuxRuntime integration is in steamlinuxruntime!76 (merged).

Edited by Simon McVittie

Merge request reports

Loading