From 9cfd7ec2258f1b7f9b3e529e3e42638a255e0c80 Mon Sep 17 00:00:00 2001 From: ckoch Date: Mon, 13 Jul 2026 12:22:27 -0400 Subject: [PATCH] Fix "ERROR: code=0; This is strange" popup at kid login bazzite-steam-bpm races waitpid against Steam PIDs that may already be gone when quitting a lingering instance, and its `if ! waitpid` clobbers $? so every failure reports code=0 via zenity. Replace the call with our own quit-and-wait (pgrep scoped to the kid's uid) and launch bazzite-steam steam://open/bigpicture directly. Co-Authored-By: Claude Fable 5 --- files/console/usr/bin/bc250-steam-bpm-autostart | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/files/console/usr/bin/bc250-steam-bpm-autostart b/files/console/usr/bin/bc250-steam-bpm-autostart index 3ccf42b..eeed154 100644 --- a/files/console/usr/bin/bc250-steam-bpm-autostart +++ b/files/console/usr/bin/bc250-steam-bpm-autostart @@ -1,5 +1,20 @@ #!/usr/bin/env bash # Autostart Steam Big Picture Mode for the kid's account only. # Other accounts (parent, RDP admin sessions) get a normal desktop. +# +# Deliberately does NOT use bazzite-steam-bpm: that wrapper has a race +# (waits on Steam PIDs that may already be gone) plus a bash `! cmd` +# status-clobbering bug, producing a zenity "ERROR: code=0; This is +# strange..." popup at login whenever Steam lingered from a previous +# session. We do the same quit-first dance robustly instead. [ "$(id -un)" = "kid" ] || exit 0 -exec /usr/bin/bazzite-steam-bpm + +if pgrep -u "$(id -u)" -f 'steam\.sh|ubuntu12_32/steam' >/dev/null 2>&1; then + /usr/bin/steam +quit >/dev/null 2>&1 || true + for _ in $(seq 1 30); do + pgrep -u "$(id -u)" -f 'steam\.sh|ubuntu12_32/steam' >/dev/null 2>&1 || break + sleep 1 + done +fi + +exec /usr/bin/bazzite-steam steam://open/bigpicture