protonscr

Cannot escape spaces in arguments when executing a game via command line

steamopen Steam client
ValveSoftware/steam-for-linux#8315 · opened 2021-12-24 by Jacksaur · updated 2021-12-24 · 0 comments · github
JJacksaur 2021-12-24 github

Your system information

  • Steam client version (build number or date): Dec 16
  • Distribution (e.g. Ubuntu): Ubuntu 21.10 (Kubuntu)
  • Opted into Steam client beta?: Yes
  • Have you checked for system updates?: Yes

Please describe your issue in as much detail as possible:

When launching a game via command, any spaces in arguments will be interpreted as the end of the command. Even with escape characters or when enclosed in quotes. This command works fine on Windows, and only fails on Linux. I have been using Retroarch to test.
The command: flatpak run org.libretro.RetroArch -L /home/james/.steam/steam/steamapps/common/RetroArch/cores/fceumm_libretro.so "/home/james/.pegasus/Games/NES/Micro Mages.nes" works and the game launches under Retroarch perfectly.
The command steam -applaunch 1118310 -L /home/james/.steam/steam/steamapps/common/RetroArch/cores/fceumm_libretro.so "/home/james/.pegasus/Games/NES/Micro Mages.nes" fails, with Retroarch's logs mentioning:
[libretro WARN] Error opening "/home/james/.pegasus/Games/NES/Micro"![ERROR] [Content]: Failed to load content
The same command (with paths adjusted of course) works on Windows.

Steps for reproducing this issue:

  1. Open a Terminal
  2. Ensure Retroarch is installed, a Core installed to it, and a rom file to launch (Micro Mages provides one alongside its PC release) is available.
  3. Use the command: steam -applaunch 1118310 -L PATH TO CORE "PATH TO ROM WITH SPACES"
  4. Retroarch will fail to start as it looks for the incorrect file path.

Nothing extracted yet.