0

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!

1

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>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.