ValveSoftware / steam-for-linux

Issue tracking for the Steam for Linux beta client
4.21k stars 175 forks source link

Run application in Proton prefix option #5766

Open kisak-valve opened 5 years ago

kisak-valve commented 5 years ago

Issue transferred from https://github.com/ValveSoftware/Proton/issues/1485. @4LT posted on 2018-09-16T13:27:21:

Feature Request

I confirm:

Description

I'm requesting an easier means of running utilities under Proton. I think a good solution would be to have Steam auto-detect the file type of programs added through 'Add a non-Steam game' and run them under proton if they are Windows executables.

Justification

Some games provide utilities that need wine/proton to run, such as Worms Armageddon's sound bank editor. Currently, the only way to get at them (that I know of) is to take an existing steam game and set its launch options to something like /path/to/proton waitforexitandrun /path/to/utility && echo %command% >/dev/null. This is cumbersome, and requires swapping launch options every time you want to switch between the game and the utility. Additionally, trying to run Proton as a non-steam game does not work because it does not run under the same environment as it does when run from a steam game's launcher.

Risks

tatsujb commented 5 years ago

being only able to launch games through steam wouldn't be enough though.

some game's require utilities that run them while passing them dynamic arguments.

Said argument that can't be passed to steam for steam to pass down to the game, ...that I know of.

So it needs to be also possible to pass through the command-line-only version of Proton as well.

GTX64 commented 5 years ago

I am envisioning this feature as a way to install external DLC, so thumbs up!

For example, in Mass Effect and Mass Effecvt 2, DLC was available as a downloadable .exe, which then, to my understanding, 'patched' the game. (It was not available from within Steam's DLC section.)

I would like to be able to run these DLC .exe's against the Steam Proton pfx, in order for the material to be available.

NOTE: When I searched for other requests to match what I am looking for, they were closed and pointed back to here. Apologies if this is not the correct place.

SparrowOchon commented 5 years ago

If you switch from waitforexitandrun to run you would get this /path/to/proton run /path/to/utility && echo %command% >/dev/null. Which allows you to run multiple programs in the prefix at the same time. I also wrote a small script to get this working temporarily without having to touch the steam-startup options as we wait for an official update.

Evernow commented 4 years ago

If you switch from waitforexitandrun to run you would get this /path/to/proton run /path/to/utility && echo %command% >/dev/null. Which allows you to run multiple programs in the prefix at the same time. I also wrote a small script to get this working temporarily without having to touch the steam-startup options as we wait for an official update.

I just tried this script and I do not believe it works anymore, opened an issue here: https://gitlab.com/SparrowOchon/proton-exec/issues/1

Please take a look at it when you can

SparrowOchon commented 4 years ago

@Evernow tested script still works, the issue is probably with the pathing of your steam compatdata. Continuing discussion on gitlab to avoid hijacking this.

smirgol commented 3 years ago

I too ran into this issue, where I need to run an application that is located in a games proton prefix. The only way right now that I knew of is to do this in the terminal, set the WINEPREFIX to the games proton prefix, run the correct proton wine64 binary and launch the app. That is not an ideal solution and I think it bypasses some things proton is doing when being launched via steam.

What I really would love to see is, being able to add a non-steam application to steam (that is possible right now), and being able to set in the launcher options to run it in a specific proton prefix - what this ticket is basically about.

nstgc commented 3 years ago

I haven't tried this, but would it be possible to replace the game's executable with a bash script that launches all relevant programs?

berarma commented 3 years ago

I've found an issue closely related to this. rFactor 2 is a racing game that ships a game server within the game but it has to be run separately and it doesn't have a Steam launcher.

The game server uses port 27013 as configured for Http communication, and by the documentation two more ports are open by Steam after this one, UDP 27014 and 27015.

When I run the game server outside of Steam or with a non-Steam game launcher these Steam ports aren't created and thus the game can't find the server locally. But if I launch the game server using the default game launcher by changing the launcher options or swapping the executables the ports are created.

I've tried with proton-exec from the command line and from a non-steam game launcher but it doesn't create the ports either. It seems the multiplayer integration breaks unless the default game launcher is used.

On Windows the game server can be launched outside of Steam and it works.

Alex-Bujorianu commented 2 years ago

I too would like to see a solution to this problem. My preferred solution would be to have a right click menu in the game’s entry in the Steam Library, named “Run .exe…” or perhaps “Run .exe inside game installation…” A normal user probably doesn’t know what a Wineprefix is, but there needs to be some indication that Proton games are sandboxed and have their own virtual “C:” drives.

For Dragon Age: Origins, I had to run Proton from the command line:

#!/bin/bash
cd /mnt/2fc5a9a8-67ad-479f-ab77-2ca48c29ac8c/SteamLibrary2/steamapps/compatdata/47810/pfx
STEAM_COMPAT_DATA_PATH="/mnt/2fc5a9a8-67ad-479f-ab77-2ca48c29ac8c/SteamLibrary2/steamapps/compatdata/47810" WINEPREFIX=$PWD \
    /home/alex/.steam/root/steamapps/common/Proton\ 5.13/proton run \
    /mnt/2fc5a9a8-67ad-479f-ab77-2ca48c29ac8c/SteamLibrary2/steamapps/common/Dragon\ Age\ Ultimate\ Edition/bin_ship/DAUpdater.exe
bidzapfc commented 2 years ago

I would like to add that this feature is a must for Genie Scout for Football Manager series. I cant run it any other way. Would be nice to have it integrated into steam

ThisNekoGuy commented 2 years ago

This is probably obvious, but this issue not being implemented affects a wide array of community mod tools for various games; it would be great to get user-friendly implementation for this, including fixes for .NET 5 and 6, since many of such tools are written in C#.

Alex-Bujorianu commented 2 years ago

This is probably obvious, but this issue not being implemented affects a wide array of community mod tools for various games; it would be great to get user-friendly implementation for this, including fixes for .NET 5 and 6, since many of such tools are written in C#.

Tell me about it. Some modding tools have to be run from within a Windows VM because the .NET stuff just doesn’t play nice with Proton.

bjoern-tantau commented 2 years ago

This has become evident with the Steam Deck. When you install a game with an external launcher you would create three prefix folders where only one was needed.

Let's say I run the installer.exe of a launcher by adding it as a non-Steam game. It would create prefix1 and install the launcher there.

If I then add the launcher.exe as a non-Steam game it would create prefix2 and possibly put any game data I downloaded with the launcher there.

If I then add a game's exe as a non-Steam game it would create prefix3. Launching it could potentially fail if it needs dependencies from the launcher that were installed into prefix1.

A quick solution would be if Steam could detect that it's starting a file in a compdata folder and adjust the STEAM_COMPAT_DATA_PATH accordingly.