Fix Steam login flicker with 2GB shm and stable launch scripts.

Use tini-backed entrypoint, two-phase Steam startup, and a window keeper so CEF UI and the fluxbox toolbar stay visible in Moonlight.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-27 18:47:58 +03:00
parent 907d26af0b
commit ab4ee8b9d6
16 changed files with 720 additions and 80 deletions

31
scripts/entrypoint.sh Normal file
View File

@@ -0,0 +1,31 @@
#!/bin/bash
set -e
rm -f /tmp/.X99-lock /tmp/.X11-unix/X99
id steam >/dev/null 2>&1 || useradd -m -s /bin/bash steam
mkdir -p /home/steam/.local/share/Steam /tmp/xdg-steam /home/steam/tmp
ln -sfn /home/steam/.local/share/Steam /home/steam/.steam
chown -R steam:steam /home/steam /tmp/xdg-steam
mkdir -p /run/dbus
rm -f /run/dbus/pid
dbus-daemon --system --fork || true
Xorg :99 -config /etc/X11/xorg-dummy.conf -nolisten tcp -noreset \
+extension GLX +extension RANDR +extension RENDER &
export DISPLAY=:99
export HOME=/root
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
mkdir -p /root/.fluxbox
cp -f /etc/game-server/fluxbox/init /root/.fluxbox/init
sleep 3
fluxbox &
sleep 2
xsetroot -solid "#3c3c3c" 2>/dev/null || true
exec /usr/bin/sunshine

17
scripts/fluxbox/init Normal file
View File

@@ -0,0 +1,17 @@
session.menuFile: ~/.fluxbox/menu
session.keyFile: ~/.fluxbox/keys
session.styleFile: /usr/share/fluxbox/styles/Emerge
session.configVersion: 13
session.screen0.toolbar.visible: true
session.screen0.toolbar.placement: BottomCenter
session.screen0.toolbar.height: 32
session.screen0.toolbar.autoHide: false
session.screen0.toolbar.widthPercent: 100
session.screen0.toolbar.layer: Top
session.screen0.toolbar.onhead: 0
session.screen0.toolbar.maxOver: true
session.screen0.toolbar.alpha: 255
session.screen0.toolbar.tools: clock, iconbar, systemtray
session.screen0.strftimeFormat: %d %b %H:%M