Skip to content

Instantly share code, notes, and snippets.

@smo0z
Last active April 8, 2024 20:28
Show Gist options
  • Star 19 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save smo0z/620d9d98e27dbba01345a5b21948f545 to your computer and use it in GitHub Desktop.
Save smo0z/620d9d98e27dbba01345a5b21948f545 to your computer and use it in GitHub Desktop.
Proton Launch Script
#!/bin/sh
# Application path
APP_PATH="$(dirname "${BASH_SOURCE[0]}")"
cd "$APP_PATH"
# Executable file
APP_EXEC="$APP_PATH/.exe"
# Steam / IDs
export SteamAppId=""
export SteamGameId=""
# Steam / Client path
export STEAM_COMPAT_CLIENT_INSTALL_PATH="$HOME/.steam/steam"
# Steam / Apps path
STEAM_APPS_PATH="$STEAM_COMPAT_CLIENT_INSTALL_PATH/steamapps"
# Steam / Compat data path
export STEAM_COMPAT_DATA_PATH="$STEAM_APPS_PATH/compatdata/$SteamAppId"
# Proton / Path
PROTON_PATH="$STEAM_APPS_PATH/common/Proton 4.11"
# Proton / Executable script
PROTON_EXEC="$PROTON_PATH/proton"
python "$PROTON_EXEC" run "$APP_EXEC"
@something12356
Copy link

something12356 commented Feb 1, 2021

I'm trying to use this script to run megahack and Geometry Dash in the same prefix, I've put 322170 in the steamapp and steamgameid, and the path to megahack in app_path, but Geometry Dash does not open. Any idea why this is? Here's the output of my console when I run it incase that helps: esync: up and running. Setting breakpad minidump AppID = 322170 Steam_SetMinidumpSteamID: Caching Steam ID: 76561198334918911 [API loaded no]

@smo0z
Copy link
Author

smo0z commented Feb 2, 2021

Put the path to the megahack executable in APP_PATH and the executable name in APP_EXEC. or place this script in the magehack folder, leave APP_PATH as it is and just put the executable name in APP_EXEC.

If this doesn't work, launch Geometry Dash with the following launch options: PROTON_DUMP_DEBUG_COMMANDS=1 %command%, go to /tmp/proton_yourusername, copy the run file somewhere and edit DEF_CMD to the megahack exe.

@something12356
Copy link

something12356 commented Feb 2, 2021

When I run the script with the exe name in APP_EXEC both Geometry Dash and MegaHack launch, but the Geometry Dash window does not open. When I edit run and change the DEF_CMD path to the megahack exe with geometry dash open megahack doesn't launch, I assume I'm doing something wrong?

@lunalucadou
Copy link

This script is nice, but it doesn't work if you are attempting to launch a game stored on a Steam library folder outside of the home directory default library.
It also does not use best practices with regards to variable expansion.

To deal with this, I took the liberty of forking the script. For anyone interested in launching games on external Steam libraries (or just a more robust script in general), check it out here:

https://gist.github.com/lunalucadou/132a84d6e5d248847f9e90160f7789d7

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