protonscr

"Join Game" fails for lobby games if launch options are set

steamclosed reviewedSteam client
ValveSoftware/steam-for-linux#3798 · opened 2015-04-16 by ghost · updated 2019-07-18 · 5 comments · github
?ghost 2015-04-16 github

On latest beta, if you try to use "Join Game" from profiles or friends list (or even using ~/.steam/steam.pipe) and you have launch options set for that particular game, startup fails with the following error (in case of Borderlands2):

ExecSteamURL: "steam://joinlobby/49520/[..]/12345678910"
Game update: AppID 49520 "Borderlands 2", ProcID 26655, IP 0.0.0.0:0
/bin/sh: +_: invalid option
Usage:  /bin/sh [GNU long option] [option] ...
        /bin/sh [GNU long option] [option] script-file ...
GNU long options:
        --debug
        --debugger
        --dump-po-strings
        --dump-strings
        --help
        --init-file
        --login
        --noediting
        --noprofile
        --norc
        --posix
        --rcfile
        --restricted
        --verbose
        --version
Shell options:
        -ilrsD or -c command or -O shopt_option         (invocation only)
        -abefhkmnptuvxBCHP or -o option
set +o allexport
set -o braceexpand
set -o emacs
set +o errexit
set +o errtrace
set +o functrace
set -o hashall
set -o histexpand
set -o history
set +o ignoreeof
set -o interactive-comments
set +o keyword
set +o monitor
set +o noclobber
set +o noexec
set +o noglob
set +o nolog
set +o notify
set +o nounset
set +o onecmd
set +o physical
set +o pipefail
set +o posix
set +o privileged
set +o verbose
set +o vi
set +o xtrace
Game removed: AppID 49520 "Borderlands 2", ProcID 26655

Attaching strace to the steam process via
strace -f -e process -s 2555 -v -p $PID
shows
[pid 30566] execve("/bin/sh", ["/bin/sh", "-c", "+connect_lobby 12345678910 env SSL_CERT_DIR=/etc/ssl/certs \"$INSTPATH/Borderlands 2/./Borderlands2\""],

Set launch options are
env SSL_CERT_DIR=/etc/ssl/certs %command%

So it looks like steam does something like
$SHELL -c $COMMAND +connect_lobby $LID $LAUNCH_OPTIONS
with $COMMAND="" when launch options are set?

If clearing launch options, the result is a working
[pid 31109] execve("/bin/sh", ["/bin/sh", "-c", "\"$INSTPATH/Borderlands 2/./Borderlands2\" +connect_lobby 12345678910"]

Probably, the invocation should be
$SHELL -c $COMMAND $LAUNCH_OPTIONS +connect_lobby $LID

And while we're at it, additional request for game settings and invocation: If game overlay is disabled, please stop LD_PRELOAD'ing gameoverlayrenderer.so. That is, don't pass it through the environment to that shell invocation.

?ghost 2015-04-16 github

It's even enough to put %command% into launch options and try to join a lobbied game, to get failure

AAnAkkk 2015-05-12 github

I am experiencing the same issue when trying to use a steam://connect/ link on any Valve games.

AAnAkkk 2015-05-27 github

Something which might be related:
I can no longer use optirun %command% in the launch options, every time it seems to put /usr/lib32 higher in LD_LIBRARY_PATH and before the paths that optirun adds, so it loads the wrong libGL.so.1 first. It works fine with primusrun though.

Nnoriah 2015-06-02 github

This problem has been seen before. Its has been reported here: https://github.com/ValveSoftware/steam-for-linux/issues/3336

It has to do with the way steam orders the launch arguments. It does not place the connect argument inside the %command%, it just appends it to its launch string before it appends %command%.

Kkisak-valve maintainer 2018-07-27 github

Closing as a duplicate of #3336.