Skip to content

Instantly share code, notes, and snippets.

@michaelbutler
Last active January 31, 2023 09:46
Embed
What would you like to do?
How to run another .exe in an existing proton wine prefix

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

Wstart

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

@tuxtergames
Copy link

hey, I'm trying to do this here but without success, I need to run pes21 lite + sider.exe at the same time, but proton can't do this, do you know a way to run 2 .exe programs in the same prefix at the same time? when I run sider.exe proton wait ot finish program to start the game.
I'll appreciate any help, tks....

@YourLocalMedic
Copy link

Help would be appreciated. I am trying to run a program so that I can use LuteMod for Mordhau, but I am getting an error. It reports that the key error is the variable STEAM_COMPAT_CLIENT_INSTALL_PATH. Help fixing this would be very appreciated. :)

@DeeBeeDouble
Copy link

Help would be appreciated. I am trying to run a program so that I can use LuteMod for Mordhau, but I am getting an error. It reports that the key error is the variable STEAM_COMPAT_CLIENT_INSTALL_PATH. Help fixing this would be very appreciated. :)

Same problem here. Please help ;)

@GroovyGab
Copy link

Help would be appreciated. I am trying to run a program so that I can use LuteMod for Mordhau, but I am getting an error. It reports that the key error is the variable STEAM_COMPAT_CLIENT_INSTALL_PATH. Help fixing this would be very appreciated. :)

Yep, same problem

@michaelbutler
Copy link
Author

@YourLocalMedic, @DeeBeeDouble, @GaboTheCoder I don't know if this will fix it, but try running this first:

export STEAM_COMPAT_CLIENT_INSTALL_PATH="$HOME/.steam/steam"

@DeeBeeDouble
Copy link

@YourLocalMedic, @DeeBeeDouble, @GaboTheCoder I don't know if this will fix it, but try running this first:

export STEAM_COMPAT_CLIENT_INSTALL_PATH="$HOME/.steam/steam"

Hm for me it now just does nothing. It just stops with no output. No launching program or process. Just nothing.

@YourLocalMedic
Copy link

Now I am getting a weird error where the command returns that the proton file does not exist.
bash: /home/yourlocalmedic/.local/share/Steam/compatibilitytools.d/Proton-6.16-GE-1/proton/: No such file or directory
I am certain that a typo is not being made.

@UVClay
Copy link

UVClay commented Sep 23, 2021

_bash: /home/yourlocalmedic/.local/share/Steam/compatibilitytools.d/Proton-6.16-GE-1/proton/: No such file or directory

Pretty sure that should just be /proton not /proton/.

@YourLocalMedic
Copy link

@UVClay That changed nothing, unfortunately.

@dododome01
Copy link

dododome01 commented Sep 29, 2021

It needs steam client folder, and proton folder structure has been changed.
After fixing it we get this:
STEAM_COMPAT_CLIENT_INSTALL_PATH="/path/to/steam" STEAM_COMPAT_DATA_PATH="/path/to/steam/steamapps/compatdata/appid" WINEPREFIX=$PWD "/path/to/steam/compatibilitytools.d/Proton_Version/proton" run "/path/to/application"
It will get the program running inside the prefix.
But its still not possible to run both the programm and the steam game at the same time.

@Liokardo
Copy link

Liokardo commented Oct 5, 2021

How do you make a shortcut within Steam with this? Best to have it there, right by the respective game. (with the game's name + program name, for sorting, so that it is beside the game)

@dododome01
Copy link

How do you make a shortcut within Steam with this? Best to have it there, right by the respective game. (with the game's name + program name, for sorting, so that it is beside the game)

Doesnt work anyways, Since Proton 6 you cant run 2 differen programs inside the same prefix.
The only way to do it now is to use steamtinkerlaunch to change the started program to a .bat and launch both .exe from there.
If you do it that way you might have to pass the arguments to the game start.

@noabody
Copy link

noabody commented Oct 9, 2021

So... I wrote a little bash script to help me with this problem and it works pretty good. wstart

It's command line but creates dynamic menus to alleviate some of the tedium of typing. Personally, I've been using it for years to run programs within Steam Protons and game prefixes. That said, you can't launch Proton, via Steam, and then another program within that running context. Steam locks the prefix.

Steam does host some non-Steam DRM protected games. I recently used wstart with "Mafia: The City of Lost Heaven" and the "MafiaCon" loader. That works fine (I had to disable winegstreamer to prevent crash on video) using the Steam Proton and prefix without actually launching it from Steam.

@Deus-nsf
Copy link

Dude, this is GREAT!
Finally maybe an option to use Proton for STALKER Lost Alpha?
However STALKER Lost Alpha is not a Steam game, I have to add it as a non steam game, is there a way to do this for non steam games as well?
I've tried to use Lutris, and while it works, the performance was horrible sadly.

@BETLOG
Copy link

BETLOG commented Oct 18, 2021

The two errors mentioned in the comments above I solved with some of the following. ie: the location of STEAM_COMPAT_CLIENT_INSTALL_PATH, and setting WINEPREFIX.

compatdataDir="/media/user/steamdata/.steam/steam/steamapps/compatdata/<id>"
    mkdir "$compatdataDir" 2> /dev/null
winePrefixDir=${compatdataDir}/pfx
    cd "$winePrefixDir"
export STEAM_COMPAT_DATA_PATH="$compatdataDir"
export STEAM_COMPAT_CLIENT_INSTALL_PATH="$HOME/.steam"
export WINEPREFIX="${winePrefixDir}"

and reinstalling the stuff gstreamer complains about seems to fix its symlinks

sudo apt-get install --reinstall gstreamer1.0-alsa gstreamer1.0-libav gstreamer1.0-plugins-bad gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-pulseaudio libgstreamer-plugins-bad1.0-0 libgstreamer-plugins-base1.0-0 libgstreamer-plugins-good1.0-0 libgstreamer1.0-0

@ghuser0123
Copy link

So... I wrote a little bash script to help me with this problem and it works pretty good. wstart

It's command line but creates dynamic menus to alleviate some of the tedium of typing. Personally, I've been using it for years to run programs within Steam Protons and game prefixes. That said, you can't launch Proton, via Steam, and then another program within that running context. Steam locks the prefix.

Steam does host some non-Steam DRM protected games. I recently used wstart with "Mafia: The City of Lost Heaven" and the "MafiaCon" loader. That works fine (I had to disable winegstreamer to prevent crash on video) using the Steam Proton and prefix without actually launching it from Steam.

You are a life saver, this is EXACTLY what I was looking for, actually, this whole time I was trying to do this manually, so this has saved me a lot of time. Seriously, this is good work! Thank you!

@sabi1
Copy link

sabi1 commented May 9, 2022

If I try that, I get a black screen with barely anything being displayed.

@noabody
Copy link

noabody commented May 10, 2022

If you're talking about wstart, that shouldn't happen when properly configured. I wasn't entirely correct when I said you can't run another program within a proton prefix. With the way wstart is currently setup, it should work just fine. The tricky bit is that you have to do it after the Steam program is launched.

So the order of operation is this:

  • Launch Steam program and be sure you are aware of which proton version it is running against, assuming more than one is installed
  • Use wstart to select the same version, then the program to run alongside

I have Elder Scrolls Oblivion installed on my computer. It's actually using proton-ge. I also have the stand-alone version of 32-bit 7zip extracted to my Downloads folder. After I launch Oblivion, I alt-tab to get back to Linux (some games don't alt-tab well, so try to run it windowed instead). In the command shell I type wstart -pp Downloads/7zip/7zFM.exe or just wstart -pp Downloads/7zip, choose the option for proton-ge, then a menu is displayed that shows existing Steam versions (wine prefixes):

1493710  Proton Experimental
1887720  Proton 7.0
22320  The Elder Scrolls III: Morrowind
22330  The Elder Scrolls IV: Oblivion 
489830  The Elder Scrolls V: Skyrim Special Edition
1) 0/pfx	3) 1580130/pfx	5) 22320/pfx	7) 489830/pfx
2) 1493710/pfx	4) 1887720/pfx	6) 22330/pfx	8) quit
Please enter your choice:

I select 6 for 22330/pfx since it matches 22330 The Elder Scrolls IV: Oblivion
Voila, 7zip file manager is running alongside Oblivion. We can verify this by running wstart -pc which eventually brings up a menu:

1) Command Prompt      4) Task Manager	      7) quit
2) Control Panel       5) Windows Explorer
3) Registry Editor     6) Wine Configuration
Please enter your choice:

Choose 4 for Task manager and both programs are running together.
oblv_7z

@ThomasEricB
Copy link

@noabody Could you make a Steam Deck version for this?

@tuxtergames
Copy link

@noabody Could you make a Steam Deck version for this?

hey buddy, you'l try steamtinkerlaunch, solve my all problems

@ThomasEricB
Copy link

hey buddy, you'l try steamtinkerlaunch, solve my all problems

I couldn't get it working with Ultrawide Fix for Yakuza 3 because that requires to launch another .exe... I am at a loss on what I should do

@tuxtergames
Copy link

hey buddy, you'l try steamtinkerlaunch, solve my all problems

I couldn't get it working with Ultrawide Fix for Yakuza 3 because that requires to launch another .exe... I am at a loss on what I should do

maybe its could help, its in pt-br but you can follow the steps, I did this to launch another exe before launch the game here https://www.youtube.com/watch?v=nl2VgTQJUD8&t=254s

@ThomasEricB
Copy link

maybe its could help, its in pt-br but you can follow the steps, I did this to launch another exe before launch the game here https://www.youtube.com/watch?v=nl2VgTQJUD8&t=254s

Good thing I'm a Brazilian! Obrigado

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