Trying to wrap game launch - Steam Linux

Trying to wrap game launch - Steam Linux - Ethnic father and son launching toy plane on beach at sunset

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:

  1. Move the original executable to a new filename, and make a bash script to replace it (making sure to mark it executable)
  2. curl out a URL to notify a server (that's keeping timestamps, etc.) that I've started
  3. Launch the actual game (using $@ to make sure any options are sent in as well)
  4. curl out 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"

Trying to wrap game launch - Steam Linux - Man and Woman Standing Beside Blue and Black Table
Trying to wrap game launch - Steam Linux - Person in Brown Leather Jacket Holding Black Handle Bar
Trying to wrap game launch - Steam Linux - Man in Brown Leather Jacket Standing Beside Woman in Blue Shirt



Quick Answer about "Trying to wrap game launch - Steam Linux"

  • Move the original executable to a new filename, and make a bash script to replace it (making sure to mark it executable)
  • curl out a URL to notify a server (that's keeping timestamps, etc.) ...
  • Launch the actual game (using $@ to make sure any options are sent in as well)




  • 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