Running games through Steam's Proton is great. But what if there is a secondary exe or configuration application bundled with the game? How can you launch it if Steam itself only launches the game?
Simply run this command in a terminal:
cd /path/to/steam/steamapps/compatdata/20920/pfx
STEAM_COMPAT_DATA_PATH="/path/to/steam/steamapps/compatdata/20920" WINEPREFIX=$PWD \
"$HOME/.steam/root/steamapps/common/Proton 5.0/proton" run ./drive_c/path/to/custom_application.exe
Where 20920 is the game id.
First you cd (change directory) to the proton prefix in question. If you don't have any custom steam libraries it likely will all be within your home directory. To find it easier you may run find . | grep compatdata from ~/ and when you find it, cd to it.
Real world example:
cd /media/michael/SSDGAMES/steam/steamapps/compatdata/20920/pfx
STEAM_COMPAT_DATA_PATH="/media/michael/SSDGAMES/steam/steamapps/compatdata/20920" WINEPREFIX=$PWD \
"/home/michael/.steam/root/steamapps/common/Proton 5.0/proton" run \
./drive_c/flawless/FlawlessWidescreen.exe
Someone in the comments below created a bash script that makes this easier: https://gist.github.com/michaelbutler/f364276f4030c5f449252f2c4d960bd2?permalink_comment_id=3921629#gistcomment-3921629
Bit of an out there scenario I could use some help with. I'm running a non-steam game that has a mod requiring an exe to run within it's same prefix to configure. I tried running the command at the top here with the, as far as I can tell, correct paths substituted
STEAM_COMPAT_DATA_PATH="/mnt/{second hard drive}/Tark" WINEPREFIX=$PWD "/home/freak/.local/share/Steam/compatibilitytools.d/GE-Proton11-5/proton" run /mnt/{second hard drive}/SPT/Greed.exeThe 'Tark' folder seems to contain the same files found in a steam compatdata as listed in the original example, but is also the location of the prefix. The exe and files it adds/modifies are in the parallel 'SPT' folder (which does raise another concern as to whether it will be able to do that without some extra step) I must be missing something though, because the output reads
ProtonFixes[28143] WARN: Skipping fix execution. We are probably running a unit test. Traceback (most recent call last): File "/home/freak/.local/share/Steam/compatibilitytools.d/GE-Proton11-5/proton", line 2736, in <module> g_session.init_session(sys.argv[1] != "runinprefix") File "/home/freak/.local/share/Steam/compatibilitytools.d/GE-Proton11-5/proton", line 2546, in init_session g_compatdata.setup_prefix() File "/home/freak/.local/share/Steam/compatibilitytools.d/GE-Proton11-5/proton", line 1153, in setup_prefix steamdir = os.environ["STEAM_COMPAT_CLIENT_INSTALL_PATH"] ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<frozen os>", line 685, in __getitem__ KeyError: 'STEAM_COMPAT_CLIENT_INSTALL_PATH'and the program does not launch. What's going on here? Have I messed up something simple, is more information needed? Might there be a better way of going about this, like protontricks or Lutris (trying that as well but not having much luck)