From cee61624312af196de22a4e9e2298e5319379686 Mon Sep 17 00:00:00 2001 From: Mitja Horvat Date: Thu, 3 Sep 2026 21:24:50 +0200 Subject: [PATCH] fix: gabi_check was parsing the UID column instead of the USER column MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit loginctl list-users columns are 'UID USER LINGER STATE' — taking the first field compared 'gabi' against UIDs, so the check always returned False. Match the second field (the username) instead. --- devices.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/devices.py b/devices.py index 3f2200a..898aba3 100644 --- a/devices.py +++ b/devices.py @@ -91,7 +91,8 @@ def gabi_check() -> bool: result = _run(["loginctl", "list-users"]) if result is None: return False - users = {line.split()[0] for line in result.stdout.splitlines() if line.split()} + # columns: UID USER LINGER STATE — username is the second field + users = {line.split()[1] for line in result.stdout.splitlines() if len(line.split()) > 1} return "gabi" in users