Skip to content

Instantly share code, notes, and snippets.

@raydeejay
Created February 24, 2022 17:46
Show Gist options
  • Save raydeejay/97a4c35cc37bdec5c66f149875be70fa to your computer and use it in GitHub Desktop.
Save raydeejay/97a4c35cc37bdec5c66f149875be70fa to your computer and use it in GitHub Desktop.
Script to run exes on the same environment as games (Proton)
#!/bin/bash
# run exes on the same environment as the game, for modding purposes and such
#replace with the id of the game
ID=205100
#adjust to the proper path
GAMELIBDIR=/media/raydj/extra/SteamLibrary
COMPATDIR=${GAMELIBDIR}/steamapps/compatdata/${ID}
VERSION=`cat ${COMPATDIR}/version | cut -f1 -d-`
#adjust to the proper path
PROTONDIR=~/.steam/steam/steamapps/common/"Proton ${VERSION}"
#pass the exe and arguments
STEAM_COMPAT_DATA_PATH=${COMPATDIR} "${PROTONDIR}/proton" run $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment