Skip to content

Instantly share code, notes, and snippets.

@Kjir
Last active May 7, 2025 23:33
Show Gist options
  • Save Kjir/dadb0a2bc1a71aa265cfdbecaf7569b8 to your computer and use it in GitHub Desktop.
Save Kjir/dadb0a2bc1a71aa265cfdbecaf7569b8 to your computer and use it in GitHub Desktop.
Running CaptureAge in Linux

Running CaptureAge in Linux

The latest version of CaptureAge (1.16.0) will now work with Linux. To get it working, here are some steps:

  1. Download the installer from the CaptureAge website
  2. Save the captureage script and place it in a location of your choice (e.g. ~/.local/bin/). Ensure it's executable
  3. Find out the path to the proton executable used by Steam for Age of Empires II and adjust PROTON_EXEC accordingly
  4. Uncomment the line to run the installer and adjust the path if needed. Comment the last line.
  5. Check that the windows version is set to at least windows 10 with protontricks 813780 winecfg
  6. Run protontricks 813780 d3dcompiler_47
  7. Now run the captureage script. Install captureage. It should run!
  8. Check if your CaptureAge is installed in AppData/Local/Programs/CaptureAge or AppData/Local/Programs/CADE and adjust accordingly.
  9. Change the captureage script to not run the installation exe anymore, but directly CaptureAge
  10. Profit

Figuring out the path to proton

To figure out the path to the proton executable used by Age of Empires II, set the Launch Options to echo %command% > ~/steam_cmd.txt. Start the game (it will not run, but exit immediately). Set back the Launch options to what they were. You now have a file in your home directory that includes the full path to the proton executable.

Getting the aoe2de:// URLs to work with AoE2

To register the aoe2de:// URL handler, you need a desktop file and a script. Here is how to set it up:

  1. Copy the aoe2url file in a location of your choice, preferably ~/.local/bin. Ensure it's executable.
  2. Adjust the path to proton in the script. Same as above.
  3. Save the AoE2UrlHelper.desktop file in ~/.local/share/applications/
  4. Adjust the path the aoe2url script on line 4
  5. Run sudo update-desktop-database to add the application to the database
  6. Run xdg-mime default AoE2UrlHelper.desktop x-scheme-handler/aoe2de to associate the URL Helper with the aoe2de:// scheme.

Now you can open games by typing the game url (e.g.: aoe2de://123456789) in the browser. You can also open games directly from the Spectator Dashboard

#!/usr/bin/bash
export PROTON_LOG=1
export STEAMAPPS="$HOME/.local/share/Steam/steamapps"
export STEAM_COMPAT_DATA_PATH="$STEAMAPPS/compatdata/813780"
export STEAM_COMPAT_CLIENT_INSTALL_PATH="$HOME/.steam"
# Adjust this to the proton executable used by AoE2 in Steam
export PROTON_EXEC="/usr/share/steam/compatibilitytools.d/proton-ge-custom/proton"
export WINEPREFIX="$STEAMAPPS/compatdata/813780/pfx"
"$PROTON_EXEC" run "$STEAMAPPS/common/AoE2DE/Tools_Builds/AOEURLHelper.exe" "$@"
[Desktop Entry]
Name=AoE2 URL Opener
Comment=Play this game on Steam (Open URL)
Exec=/home/<youruser>/.local/bin/aoe2url %u
Icon=steam_icon_813780
Terminal=false
Type=Application
MimeType=x-scheme-handler/aoe2de;
Categories=Game;
#!/usr/bin/bash
export PROTON_LOG=1
export STEAMAPPS="$HOME/.local/share/Steam/steamapps"
export STEAM_COMPAT_DATA_PATH="$STEAMAPPS/compatdata/813780"
export STEAM_COMPAT_CLIENT_INSTALL_PATH="$HOME/.steam"
export WINEPREFIX="$STEAMAPPS/compatdata/813780/pfx"
# Adjust the path to the proton executable used by Age of Empires II
export PROTON_EXEC="/usr/share/steam/compatibilitytools.d/proton-ge-custom/proton"
# export WINEDEBUG=warn+all # This is for debug logs
# export OBS_VKCAPTURE=1 # Enable this for OBS Videogame capture
#install capture age (only needed once). Adjust the location to point to the installer you downloaded.
# "$PROTON_EXEC" run "Z:/$HOME/Downloads/CaptureAgeSetup.exe"
# run capture age
# Older version of CA:DE were installed in AppData/Local/Programs/CaptureAge . If it doesn't launch for you, check this path
"$PROTON_EXEC" run "C:/users/steamuser/AppData/Local/Programs/CADE/CaptureAge.exe"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment