Skip to content

Instantly share code, notes, and snippets.

@Kjir
Last active September 4, 2026 21:03
Show Gist options
  • Select an option

  • Save Kjir/dadb0a2bc1a71aa265cfdbecaf7569b8 to your computer and use it in GitHub Desktop.

Select an option

Save Kjir/dadb0a2bc1a71aa265cfdbecaf7569b8 to your computer and use it in GitHub Desktop.
Running CaptureAge in Linux

Running CaptureAge in Linux

The latest versions of CaptureAge (since 1.16.0) will now work with Linux.

To install it there is an installer script that can be used, which should make the setup easier: https://github.com/aoe2ct/cade-linux-installer

The rest of the README includes the original manual steps, which are the basis for the install script.

Manual steps

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"
@Kjir

Kjir commented Aug 5, 2026

Copy link
Copy Markdown
Author

@cossucci Use this gist instead: https://gist.github.com/TeknoHamster/d8b2f90a1cd618074aa1e35c81e7bc4b

I switched and worked fine.

Or maybe let's fix the issue so that we don't have 100 forks and nobody knows what to use.

@cossucci did you use the installer or did you run the instructions manually? What error do you get?

@cossucci

cossucci commented Aug 6, 2026

Copy link
Copy Markdown

@cossucci Use this gist instead: https://gist.github.com/TeknoHamster/d8b2f90a1cd618074aa1e35c81e7bc4b
I switched and worked fine.

Or maybe let's fix the issue so that we don't have 100 forks and nobody knows what to use.

@cossucci did you use the installer or did you run the instructions manually? What error do you get?

I ran the instructions manually in the terminal. The issue was with the .NET Framework if I am not mistaken

@Kjir

Kjir commented Aug 16, 2026

Copy link
Copy Markdown
Author

I ran the instructions manually in the terminal. The issue was with the .NET Framework if I am not mistaken
Could you paste the error message?

@M3crom

M3crom commented Sep 4, 2026

Copy link
Copy Markdown

FYI expect major issues when AoE2:DE is installed on a different drive/Library.
I had to set the STEAMAPPS variable (Line 2 and 133) to my external drive, line 39 doesn't handle directories with spaces in the name correctly, and edit the AppData/Roaming/CaptureAge/persistedState_prod.json to use the Z: path ("Z:\mnt\game_drive\Steam\steamapps\common\AoE2DE")
and even now i can only run capture age manually over steam as an external app.

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