Here's a little script I use to easily run windows exe files on Linux by just double clicking on them, like you would on windows. It uses Valve's Proton, and assumes you have Steam installed somewhere on Linux. I'm using Ubuntu with Gnome.
First, copy this shell script somewhere in your home directory. Mine is in /home/terry/scripts/protonlauncher.sh. (I didn't write this script, I found it on google)
#!/usr/bin/env bash
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <executable-path>"
exit 1
fi
PROTON_VER="Proton - Experimental"
COMMON_PATHS=(
"$HOME/.local/share/Steam/steamapps"
"$HOME/.steam/steam/steamapps"
"$HOME/.var/app/com.valvesoftware.Steam/.steam/steam/steamapps"
"$HOME/snap/steam/common/.local/share/Steam/steamapps"
)
PROTON_PATH=""
for path in "${COMMON_PATHS[@]}"; do
if [ -f "$path/common/$PROTON_VER/proton" ]; then
PROTON_PATH="$path/common/$PROTON_VER/proton"
STEAM_ROOT="$(dirname "$(dirname "$(dirname "$path")")")"
break
fi
done
if [ -z "$PROTON_PATH" ]; then
echo "Error: Could not find '$PROTON_VER' in any common Steam installation paths."
echo "Please ensure Steam is installed and '$PROTON_VER' is downloaded."
exit 1
fi
PROTON_PREFIX_ROOT="$HOME/.custom_proton_prefixes"
GAME_NAME="$(basename "$1" .exe | tr ' ' '_')" # Use the executable name for the prefix folder
GAME_ROOT="$(dirname "$1")"
STEAM_COMPAT_DATA_PATH="$PROTON_PREFIX_ROOT/$GAME_NAME"
cd "$GAME_ROOT" || { echo "Error: Failed to change directory to $GAME_ROOT"; exit 1; }
mkdir -p "$STEAM_COMPAT_DATA_PATH"
export STEAM_COMPAT_DATA_PATH
export STEAM_COMPAT_CLIENT_INSTALL_PATH="$STEAM_ROOT"
echo "Launching '$GAME_NAME' using $PROTON_VER..."
"$PROTON_PATH" run "$1"
echo "Finished running '$GAME_NAME'."You might need to add executable permission to this script from a terminal; something like sudo chmod +x /home/terry/scripts/protonlauncher.sh.
Next, manually create a matching .desktop entry for this script file. It needs to go in your ~/.local/share/applications/ folder, so e.g. mine is /home/terry/.local/share/applications/proton-exe-handler.desktop:
[Desktop Entry]
Name=Proton EXE Launcher
Exec=/home/terry/scripts/protonlauncher.sh %U
Terminal=true
Type=Application
Icon=com.valvesoftware.SteamLink
MimeType=application/x-ms-dos-executable;
in the line Exec=/home/terry/scripts/protonlauncher.sh %U, make sure to replace that with your path to the script.
After that, it's just a matter of associating .exe files with this .desktop file - right click any .exe file, select Open with..., pick Proton EXE Launcher, and enable Always use for this file type.