From 87c1b54f01f75b8a7adf530cc023dbcc77bb88f1 Mon Sep 17 00:00:00 2001 From: ih8js-git <141177946+ih8js-git@users.noreply.github.com> Date: Mon, 8 Jun 2026 19:15:51 -0500 Subject: [PATCH] fix(linux): respect pre-existing STEAM_COMPAT_DATA_PATH and STEAM_COMPAT_CLIENT_INSTALL_PATH env vars Previously the Linux launcher unconditionally overwrote these env vars with auto-detected Steam paths. Users with a custom Wine prefix (e.g. Lutris) or non-standard Steam layout couldn't override them via environment variables. Now the launcher only sets these values if they aren't already set in the environment, allowing users to specify a custom prefix or Proton setup. --- src/balatrobot/platforms/linux.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/balatrobot/platforms/linux.py b/src/balatrobot/platforms/linux.py index f7c5d2e4..66a98185 100644 --- a/src/balatrobot/platforms/linux.py +++ b/src/balatrobot/platforms/linux.py @@ -104,10 +104,12 @@ def build_env(self, config: Config) -> dict[str, str]: env = os.environ.copy() env["WINEDLLOVERRIDES"] = "version=n,b" + # Don't override user-set env vars (e.g. custom Wine prefix, Proton version) steam_root = _detect_steam_root() - if steam_root: + if steam_root and "STEAM_COMPAT_CLIENT_INSTALL_PATH" not in env: env["STEAM_COMPAT_CLIENT_INSTALL_PATH"] = str(steam_root) - compat_data = _detect_compat_data_path(steam_root) + if "STEAM_COMPAT_DATA_PATH" not in env: + compat_data = _detect_compat_data_path(steam_root) if steam_root else None if compat_data: env["STEAM_COMPAT_DATA_PATH"] = str(compat_data)