Skip to content

Instantly share code, notes, and snippets.

@chez14
Created November 1, 2020 10:50
Show Gist options
  • Save chez14/947abeaa2cc13837f0bb3feb43c0c972 to your computer and use it in GitHub Desktop.
Save chez14/947abeaa2cc13837f0bb3feb43c0c972 to your computer and use it in GitHub Desktop.
Proton script to run non-Steam Apps on Linux. Supposedly you have to install Steam first (requires Steam account). Then put this to `/usr/bin/proton.sh` and add required file permissions.
#!/bin/bash
# Credits: https://pastebin.com/NJxfe8Ex
PROTON_VERSION="5.0"
PROTON_DIR=$HOME/.steam/steam/steamapps/common/Proton\ $PROTON_VERSION
RUNNING="$1"
if [ ! -f "$PROTON_DIR/proton" ] ; then
echo "Proton version $PROTON_VERSION not found!";
exit
fi
if [ ! -f "$RUNNING" ] ; then
echo "$RUNNING does not exist!";
exit
fi
printf "Proton (\033[32m$PROTON_VERSION\033[0m) script found at\n \033[32m$PROTON_DIR/proton\033[0m\n\n"
printf "Now running\n \033[32m$PWD/$RUNNING\033[0m\n"
export STEAM_COMPAT_DATA_PATH="$HOME/.steam/steam/steamapps/compatdata"
export MOUNT_PATH="/mnt/c"
PROTON_USE_WINED3D11=1 \
#PROTON_NO_D3D11=0 \
PROTON_NO_ESYNC=1 \
$HOME/.steam/steam/steamapps/common/Proton\ $PROTON_VERSION/proton \
run $RUNNING \
&> /dev/null
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment