From 23295d3473077434485a5265a86c66ac5de05605 Mon Sep 17 00:00:00 2001 From: Matias Galarza Date: Sun, 13 Sep 2026 02:52:30 -0300 Subject: [PATCH] fix: resolve real home path before building shortcut paths /home is a symlink to /var/home on OSTree/atomic distros (Bazzite, Anatase). Steam's sandboxed runtime (pressure-vessel) does not follow that symlink, so a shortcut written under /home/user/... fails to launch: the Steam client logs chdir "/home/user/..." failed, errno 2 and the game never starts, even though the path resolves fine outside the sandbox. Closes #35 --- steam_utils.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/steam_utils.py b/steam_utils.py index 7a4f66c..a132561 100644 --- a/steam_utils.py +++ b/steam_utils.py @@ -92,20 +92,26 @@ def detect_platform() -> str: def get_user_home() -> str: - """Get the real user home directory (not /root when running as service).""" + """Get the real user home directory (not /root when running as service). + + Resolved with realpath: on OSTree/atomic distros (Bazzite, Anatase) `/home` + is a symlink to `/var/home`, and Steam's sandboxed runtime (pressure-vessel) + does not resolve it — a shortcut written as `/home/user/...` fails to + launch (`chdir` ENOENT) even though the path is valid outside the sandbox. + """ # Check the standard Steam Deck user first if os.path.exists("/home/deck"): - return "/home/deck" + return os.path.realpath("/home/deck") try: for entry in os.listdir("/home"): home_path = f"/home/{entry}" if os.path.isdir(home_path) and os.path.exists(f"{home_path}/.steam"): - return home_path + return os.path.realpath(home_path) except Exception: pass - return str(Path.home()) + return os.path.realpath(str(Path.home())) def expand_path(path: str) -> str: