Skip to content

Commit cb8a347

Browse files
fix: Flatpak Steam-running detection via named pipe
psutil cannot see host processes from inside the Flatpak sandbox, so the Steam-running warning never appeared. Now checks for ~/.steam/steam.pipe (FIFO) first, which is visible via the existing --filesystem=~/.steam:ro permission. Falls back to psutil for native installations. Also adds missing Flatpak build deps: pybind11 (Pillow) and six (steam). Bump to v1.3.7.
1 parent ee0d7de commit cb8a347

6 files changed

Lines changed: 73 additions & 8 deletions

File tree

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ body:
1212
attributes:
1313
label: SLM Version
1414
options:
15+
- v1.3.7
1516
- v1.3.6
1617
- v1.3.5
1718
- v1.3.4

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,19 @@ All notable changes to Steam Library Manager will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.3.7] - 2026-04-08
9+
10+
### Fixed
11+
- **Flatpak: Steam-Running detection:** The Steam-running warning never appeared
12+
when running as Flatpak because `psutil.process_iter()` cannot see host
13+
processes from inside the sandbox. Now checks for Steam's named pipe
14+
(`~/.steam/steam.pipe`) first, which is visible via `--filesystem=~/.steam:ro`.
15+
Falls back to psutil for native installations.
16+
17+
### Changed
18+
- **Flatpak dependencies:** Added missing `pybind11` (Pillow build dependency)
19+
and `six` (steam library dependency) to Flatpak manifest.
20+
821
## [1.3.6] - 2026-04-05
922

1023
### Fixed

flatpak/python3-dependencies.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,20 @@
1717
}
1818
]
1919
},
20+
{
21+
"name": "python3-pybind11",
22+
"buildsystem": "simple",
23+
"build-commands": [
24+
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"pybind11\" --no-build-isolation"
25+
],
26+
"sources": [
27+
{
28+
"type": "file",
29+
"url": "https://files.pythonhosted.org/packages/ab/87/99f21e9b20899d6dc1bf7544cfe53e5fa17acc21bb267971a540425357d3/pybind11-3.0.3-py3-none-any.whl",
30+
"sha256": "fb5f8e4a64946b4dcc0451c83a8c384f803bc0a62dd1ba02f199e97dbc9aad4c"
31+
}
32+
]
33+
},
2034
{
2135
"name": "python3-Pillow",
2236
"buildsystem": "simple",
@@ -189,6 +203,20 @@
189203
}
190204
]
191205
},
206+
{
207+
"name": "python3-six",
208+
"buildsystem": "simple",
209+
"build-commands": [
210+
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"six\" --no-build-isolation"
211+
],
212+
"sources": [
213+
{
214+
"type": "file",
215+
"url": "https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl",
216+
"sha256": "4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274"
217+
}
218+
]
219+
},
192220
{
193221
"name": "python3-steam",
194222
"buildsystem": "simple",

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[project]
44
name = "steam-library-manager"
5-
version = "1.3.6"
5+
version = "1.3.7"
66
description = "A powerful Steam library organizer for Linux - the modern Depressurizer alternative"
77
readme = "README.md"
88
license = "MIT"

steam_library_manager/main.py

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,45 @@
3434
__all__ = ["main"]
3535

3636

37-
def check_steam_running() -> bool:
38-
"""Checks if Steam is currently running using psutil."""
37+
def _check_steam_pipe() -> bool:
38+
# steam.pipe (named FIFO) only exists while Steam is running
39+
# works inside flatpak sandbox via --filesystem=~/.steam:ro
40+
home = Path.home()
41+
pipe_paths = [
42+
home / ".steam/steam.pipe",
43+
home / ".local/share/Steam/steam.pipe",
44+
home / ".var/app/com.valvesoftware.Steam/.local/share/Steam/steam.pipe",
45+
]
46+
for pp in pipe_paths:
47+
if pp.exists() and pp.is_fifo():
48+
logger.info("Steam pipe found: %s" % pp)
49+
return True
50+
return False
51+
52+
53+
def _check_steam_psutil() -> bool:
54+
# fallback: enumerate processes via psutil (not sandbox-safe)
3955
try:
4056
import psutil
4157

58+
steam_names = {"steam", "steam.exe", "steamwebhelper", "steamwebhelper.exe"}
4259
for proc in psutil.process_iter(["name"]):
4360
try:
44-
proc_name = proc.info["name"].lower()
45-
if proc_name in ["steam", "steam.exe", "steamwebhelper", "steamwebhelper.exe"]:
61+
if proc.info["name"].lower() in steam_names:
4662
return True
4763
except (psutil.NoSuchProcess, psutil.AccessDenied):
4864
continue
4965
return False
5066
except ImportError:
51-
logger.warning(t("logs.main.psutil_missing"))
5267
return False
68+
69+
70+
def check_steam_running() -> bool:
71+
# named pipe first (sandbox-safe), psutil as fallback
72+
try:
73+
if _check_steam_pipe():
74+
return True
75+
return _check_steam_psutil()
5376
except Exception as e:
5477
logger.error(t("logs.main.steam_check_error", error=e))
5578
return False

steam_library_manager/version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
__all__ = ["__app_name__", "__version__", "__release_date__", "__author__", "__license__"]
1212

1313
__app_name__ = "Steam Library Manager"
14-
__version__ = "1.3.6"
15-
__release_date__ = "2026-04-05"
14+
__version__ = "1.3.7"
15+
__release_date__ = "2026-04-08"
1616
__author__ = "SwitchBros"
1717
__license__ = "MIT"

0 commit comments

Comments
 (0)