Skip to content

Instantly share code, notes, and snippets.

@flibitijibibo
Created December 18, 2015 08:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flibitijibibo/67c57d3a9f77e7f590ca to your computer and use it in GitHub Desktop.
Save flibitijibibo/67c57d3a9f77e7f590ca to your computer and use it in GitHub Desktop.
If the Steam runtime is giving you trouble, add this to the game's launcher script. Originally used in The Cave, ported by Edward Rudd.
# Thanks Edward!
remove_runtime() {
# strip out STEAM RUNTIME from the path
VAR="$1"
declare -a paths
good_paths=""
OLDIFS=$IFS
IFS=:
paths=(${VAR})
IFS=$OLDIFS
for i in "${paths[@]}"; do
if [[ "$i" != *steam-runtime* ]]; then
good_paths="${good_paths}:${i}"
fi
done
echo ${good_paths:1}
}
PATH=`remove_runtime "$PATH"`
LD_LIBRARY_PATH=`remove_runtime "$LD_LIBRARY_PATH"`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment