ValveSoftware / steam-runtime

A runtime environment for Steam applications
Other
1.19k stars 86 forks source link

Proton fails to locate steam process when home directory is in /usr #559

Open samogot opened 1 year ago

samogot commented 1 year ago

My case is very similar to #291 and I think it might have same root cause. For the unrelated reasons my home directory stays under /usr/ prefix, so I'm affected by #288. Yes it is a strange configuration, but changing it is not an option. In my distribution, steam runtime lives in ~/.steam/debian-distribution. Again, it happens to be under /usr/ prefix, so I can't use proton there. It doesn't seem to be possible to change this location natively - when I remove it, Steam just downloads it again instead of asking where have I moved it. Changing library folder in the UI only affects downloaded games, and not the runtime itself. So I manually moved it to /opt/steam and made ~/.steam/debian-distribution a symlink pointing there. It seemed to help with /usr/ problem, and now the game starts lunching, but fails with the error that steam should be running.

[S_API] SteamAPI_Init(): SteamAPI_IsSteamRunning() did not locate a running instance of Steam.
[S_API FAIL] SteamAPI_Init() failed

Both home folder and /opt/steam are on the same partition.

I am using proton 5.0 for now, and I am able to lunch and play the game there. All versions after that fails.

smcv commented 1 year ago

@kisak-valve, please could you retitle this to "Proton fails to locate steam process when home directory is in /usr" to set the scope of this issue report?

my home directory stays under /usr/ prefix

Sorry, it is not possible for the container runtime to support this, for the same reasons as in #288. The workaround would be to run Steam as a different user ID which has its home directory not in /usr, or move Steam (including ~/.steam) and related content to a separate "fake" home directory not in /usr and run Steam with the HOME environment variable set to point to that directory.

If your home directory is on /usr because of limited disk space, then that is solvable: you can use bind-mounts to make extra space available at any filesystem path of your choice.

Other container frameworks like Flatpak would have the same problem as the Steam container runtime on your system.

[S_API] SteamAPI_Init(): SteamAPI_IsSteamRunning() did not locate a running instance of Steam

I think this will be because the Steam API uses $HOME/.steam to locate Steam, but your $HOME cannot be made available in the container (for the same reasons as in #288) because it is below /usr.