When using pressure-vessel on Flatpak, SteamAPI is unable to locate the running instance of Steam
Steps to reproduce
- Install the Flatpak version of Steam
- Create a temporary directory like
/tmp/pvs
- Add
host-os
andhost-etc
to the filesystem options:$ flatpak override --user --filesystem=host-os --filesystem=host-etc com.valvesoftware.Steam
- Launch Steam, setting
PRESSURE_VESSEL_SOCKET_DIR
to the temporary directory that we previously created and with the permission to talk to org.freedesktop.Flatpak (alternatively use override as before):$ flatpak run --talk-name=org.freedesktop.Flatpak --filesystem=/tmp/pvs --env=PRESSURE_VESSEL_SOCKET_DIR=/tmp/pvs com.valvesoftware.Steam
- Force the Steam Play compatibility tool of a game, like Floating Point, to "Proton 5.13"
- Change the launch options of the game to (change /home/ryuzaki with your username):
PRESSURE_VESSEL_COPY_RUNTIME_INTO=/home/ryuzaki/.local/share/Steam/steamapps/common/SteamLinuxRuntime_soldier/var PRESSURE_VESSEL_GRAPHICS_PROVIDER=/run/host PRESSURE_VESSEL_SHELL=instead %command%
- Launch the game
Expected behaviour
The game works
Actual result
The game launch fails with the following error:
[S_API] SteamAPI_Init(): SteamAPI_IsSteamRunning() did not locate a running instance of Steam.
[S_API FAIL] SteamAPI_Init() failed
If there is also a Steam client instance open from the host system at the same time, the execution will succeed. This means that the API is searching for a Steam instance in the host system instead of inside the Flatpak container.