Skip to main content

Module steam

Module steam 

Source
Expand description

Whether the running Steam client can resolve a path. Host facts about the Steam client: where its executable lives, and whether it can resolve a path a caller hands it.

§Locating the executable

crate::steam::steam_exe answers “what program starts Steam on this machine”. Steam is on PATH on Linux, so a bare steam is correct there, but its Windows installer adds nothing to PATH: CreateProcess appends .exe to a bare program name yet still has nowhere to look, so the spawn fails outright and the ordinary Steam configuration cannot launch at all.

§Namespace visibility

Steam’s launch options are a string the caller never opens itself: it names a wrapper script and a target directory, and Steam is what has to resolve them. On a sandboxed Steam those are resolved in a different mount namespace, so a path that exists perfectly well for the caller can be absent for Steam. When that happens nothing on the caller’s side fails, since steam -applaunch returns 0 either way, and the only record is a line in Steam’s own console log. The launch simply appears to do nothing.

This module makes that failure loud before a launch, by asking the running Steam client’s own mount namespace whether it can see the path.

This is host inspection, shared here in the engine rather than kept private to one client, because every client on Linux hits sandboxed Steam (Flatpak, Snap, containerized), and the failure mode is a launch that appears to do nothing, with the only record in Steam’s own console log. Sharing the probe is worth the impurity of reading the host machine.

Enums§

Severity
How a caller should treat a Visibility verdict.
Visibility
What was determined about Steam’s ability to resolve a path.

Functions§

steam_client_pid
The running Steam client’s pid, as Steam itself records it.
steam_exe
The program that starts the Steam client on this machine.
suspect_prefix
Whether path starts with a SUSPECT_PREFIXES entry.
visibility
Whether the running Steam client can resolve path.