protonscr

%command% doesn't work in launch options for non-Steam games

steamclosed
ValveSoftware/steam-for-linux#8025 · opened 2021-08-29 by lunananananananana · updated 2021-08-29 · 1 comments · github
1 matching comments, n / p to jump
Llunananananananana 2021-08-29 github

Your system information

  • Steam client version (build number or date): Jul 20 2021, 22:25:57
  • Distribution (e.g. Ubuntu): Arch Linux
  • Opted into Steam client beta?: Yes
  • Have you checked for system updates?: Yes

Please describe your issue in as much detail as possible:

I tried to get MangoHud to work with a non-Steam game, so I put mangohud %command% into launch options as I do with all other games, but that didn't work. After investigating the actual arguments that get passed to the game, I found this: (fish shell, the command may not work with POSIX shells)

$ pgrep launch.sh | xargs -I{} cat /proc/{}/cmdline | tr '\0' ' '
/bin/bash /home/laurin2/GI-on-Linux/updater/game/launch.sh mangohud %command%

The expected output would've been:

/bin/bash /home/laurin2/GI-on-Linux/updater/game/launch.sh

Steps for reproducing this issue:

  1. Add a non-steam game
  2. Add a wrapper program to the launch options
  3. Try to launch the game

For anyone who has the same issue, a temporary workaround is to put the wrapper program into the target field, and put the actual game (and additional wrappers) into the launch options, or if you need to set environment variables, put env into the target field and the variables and game into the launch options

Kkisak-valve maintainer 2021-08-29 github

Hello @laurinneff, this issue is already being tracked at #6046. Closing as a duplicate.

Launch lines