Skip to content

Instantly share code, notes, and snippets.

@shmup
Last active February 19, 2026 00:17
Show Gist options
  • Select an option

  • Save shmup/4e7050d50e1db2e9fc4071bf31efa934 to your computer and use it in GitHub Desktop.

Select an option

Save shmup/4e7050d50e1db2e9fc4071bf31efa934 to your computer and use it in GitHub Desktop.
easily run an .exe with proton on linux
#!/usr/bin/env bash
# This script launches a Windows executable using Proton within a Linux environment.
# It requires exactly one argument: the path to the executable to run.
# It sets up a separate Proton prefix for each executable to avoid conflicts.
# Usage: proton <path-to-executable>
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <executable-path>"
exit 1
fi
# determine where your proton binary is, the below assumes default Steam location.
# then update STEAM_ROOT and PROTON_VER
PROTON_ROOT="$HOME/.proton"
PROTON_VER="Proton - Experimental"
STEAM_ROOT="$HOME/.steam/root" # expects: steamapps/common/$PROTON_VER/proton
GAME_ROOT="$(dirname "$1")"
GAME="$(basename "$1")"
cd "$GAME_ROOT" || exit
mkdir -p "$PROTON_ROOT/$GAME"
export STEAM_COMPAT_DATA_PATH="$PROTON_ROOT/$GAME"
export STEAM_COMPAT_CLIENT_INSTALL_PATH="$STEAM_ROOT"
"$STEAM_ROOT/steamapps/common/$PROTON_VER/proton" run "$1" >/dev/null 2>&1
@shmup
Copy link
Author

shmup commented Feb 19, 2026

Appreciate it @khaosdoctor , updated w/ comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment