Trying to wrap game launch - Steam Linux
Similar to this question, I'm trying to run a script to wrap the launch of a game simply for purposes of tracking how long I've been playing.
The way I have it set up currently is:
- Move the original executable to a new filename, and make a bash script to replace it (making sure to mark it executable)
curlout a URL to notify a server (that's keeping timestamps, etc.) that I've started- Launch the actual game (using
$@to make sure any options are sent in as well) curlout a URL to notify a server that I'm done
I didn't think this would pose issues, but for whatever reason when actually running through Steam the curl command exits with status code 48 and game begins as if nothing happened. If I just run the script by hand, curl runs successfully but the game notifies me that it can't connect to Steam.
Is there a way to actually wrap commands instead of just polling to determine if the game has launched? Thank you!
Best Answer
After much research, it turns out that Steam adds its own libraries to the $LD_LIBRARY_PATH variable, which is causing issues with the curl command finding the proper libcurl.
To fix this, record what your LD_LIBRARY_PATH variable is when not running through Steam, and change it for the commands in the script with something like:
LD_LIBRARY_PATH="" <my_command>
Pictures about "Trying to wrap game launch - Steam Linux"



Quick Answer about "Trying to wrap game launch - Steam Linux"
Steam/Proton Linux FIX - Not working, stuck preparing to launch, etc. NTFS/ext4
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: billow926, RODNAE Productions, RODNAE Productions, RODNAE Productions
