Skip to content

Fix bwrap crash for non-Steam shortcuts#488

Closed
limonzhik wants to merge 1 commit into
Matoking:masterfrom
limonzhik:fix-bwrap-empty-steam-app-path
Closed

Fix bwrap crash for non-Steam shortcuts#488
limonzhik wants to merge 1 commit into
Matoking:masterfrom
limonzhik:fix-bwrap-empty-steam-app-path

Conversation

@limonzhik

Copy link
Copy Markdown
Contributor

Non-Steam shortcuts don't have an install directory, so $STEAM_APP_PATH is empty. bwrap_launcher.sh includes that empty value in the mount list, producing an invalid --filesystem argument that newer pressure-vessel versions reject with:

E: --filesystem argument must be an absolute path, not "."

Skip empty or non-absolute paths when building mount parameters.

Non-Steam shortcuts don't have an install directory, so $STEAM_APP_PATH
is empty. bwrap_launcher.sh includes that empty value in the mount list,
producing an invalid --filesystem argument that newer pressure-vessel
versions reject with:

    E: --filesystem argument must be an absolute path, not "."

Skip empty or non-absolute paths when building mount parameters.
@Matoking

Matoking commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Thanks for the fix, I've merged it to master.

Tested this and this behavior checks out when the "Start In" field in the app properties is cleared. Steam itself provides the working directory in the D-Bus call that launches the game (output from dbus-monitor, the first argument is working directory). In the first scenario in which the directory is provided:

method call time=1783007464.362946 sender=:1.686 -> destination=:1.93 serial=5 path=/com/steampowered/PressureVessel/Launcher1; interface=com.steampowered.PressureVessel.Launcher1; member=Launch
   array of bytes "/home/matoking/Games/Cave Story" + \0
   array [
      array of bytes "/home/matoking/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamrt64/pv-runtime/steam-runtime-steamrt/bin/steam-runtime-supervisor" + \0
      array of bytes "--terminate-when-signaled" + \0
      array of bytes "--env-fd=167" + \0
      array of bytes "--" + \0
      array of bytes "/bin/sh" + \0
      array of bytes "-c" + \0
      array of bytes "/home/matoking/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamrt64/steam-launch-wrapper -- /home/matoking/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamrt64/reaper SteamLaunch AppId=4041115453 -- '/home/matoking/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/common/SteamLinuxRuntime_sniper'/_v2-entry-point --verb=waitforexitandrun -- '/home/matoking/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/common/Proton 9.0 (Beta)'/proton waitforexitandrun  "/home/matoking/Games/Cave Story/Doukutsu.exe"" + \0

If an empty path is used the launcher defaults to the Steam directory:

method call time=1783007562.474074 sender=:1.719 -> destination=:1.93 serial=5 path=/com/steampowered/PressureVessel/Launcher1; interface=com.steampowered.PressureVessel.Launcher1; member=Launch
   array of bytes "/home/matoking/.var/app/com.valvesoftware.Steam/.local/share/Steam" + \0
   ...

Likewise, if a relative path such as ./userdata is used then the working directory becomes /home/matoking/.var/app/com.valvesoftware.Steam/.local/share/Steam/userdata.

So, if we wanted to replicate Steam's behavior we should also set the working directory to the Steam installation directory when --cwd-app is enabled, and apply the relative path if one was provided. But that's a small detail and something that can be fixed later.

On a different note: Steam itself populates both "Target" and "Start In" fields correctly when adding external executables. If there are non-Steam shortcuts which are missing the start directory, maybe a third-party utility is to blame?

@Matoking Matoking closed this Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants