Multiple slight issues with finding the game directory on linux. Excuse that this is more rambling in nature with me trying to give a pile of information as I run into it.
ref: https://github.com/Umbranoxio/BeatSaberModInstaller/blob/master/BeatSaberModManager/Dependencies/SteamFinder.cs
This does not correctly find the possible locations for steam on linux, nor does it use any of the recommended fall-back methods. This is partly a confusing issue I would guess since BeatSaber etc is loading via Proton/Wine/SteamPlay, which might also be masking this all a little. I am unsure what tweaks are required, but I can list the multitude of paths and information that is on-hand when executing the ModManager.
Example common environment variables when launching via Proton_Run, of specific note is STEAM_COMPAT_CLIENT_INSTALL_PATH
:
SteamGameId=620980
SteamAppId=620980
WINEDLLPATH=/home/admalledd/.steam/steam/steamapps/common/Proton 3.7/dist/lib64/wine:/home/admalledd/.steam/steam/steamapps/common/Proton 3.7/dist/lib/wine
STEAM_COMPAT_CLIENT_INSTALL_PATH=/home/admalledd/.steam
PROTON_VR_RUNTIME=/home/admalledd/.steam/steam/steamapps/common/SteamVR/
WINEPREFIX=/home/admalledd/.steam/steam/steamapps/compatdata/620980/pfx/
The other bit is that Proton_Run doesn't map/link the game to the "C:" drive, but uses the wine-virtual drive "Z:" to bridge to the linux path world. So for example there, my beat saber path in WINE is:
Z:\home\admalledd\.steam\steam\steamapps\common\Beat Saber
Note also that the GetDefaultLinuxSteamPath()
is using a very old path, it should be checking against $HOME/.steam/steam
instead (or possibly as well). https://askubuntu.com/a/579567/11161
So, I would actually recommend changing up the path finder to instead of doing "what platform are we on?", to just walk a list of possible paths in-order. (Also, possibly have a extra pre-list loaded from the app.config, such that those who want to can force a different directory)
Since the ModManager.exe might be loaded under WINE or mono, or CoreCLR, here are some Linux path examples. Of course, keep/use the steam-library loading, that to my knowledge is the same-ish on linux, just giving full path here to have more info on hand etc.
$HOME/.steam/steam/steamaapps/common/Beat Saber
$HOME/.local/share/steam/steamaapps/common/Beat Saber
$HOME/.steam/steam/steamaapps/compatdata/620980/pfx/drive_c/Program Files (x86)/Steam/steamapps/common/Beat Saber
- (when running under Proton_Run/Wine: all the above, but mapped/mangled to be under the Z: drive)