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 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user