From 7510bf2ee8582e6dc5fcc0269779dc323f72de8e Mon Sep 17 00:00:00 2001 From: bilal Date: Thu, 18 Jun 2026 20:09:10 +0300 Subject: [PATCH] Prevent Steam startup hangups and persist profile path. Launch Steam via nohup under steam user and enforce stable ~/.steam symlink for reboot-safe startup. Co-authored-by: Cursor --- Dockerfile | 1 + README.md | 7 ++++++- players/p1_config/apps.json | 2 +- players/p2_config/apps.json | 2 +- players/p3_config/apps.json | 2 +- players/p4_config/apps.json | 2 +- 6 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3eca8f1..f998064 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,6 +33,7 @@ RUN echo '#!/bin/bash\n\ rm -f /tmp/.X99-lock /tmp/.X11-unix/X99\n\ id steam >/dev/null 2>&1 || useradd -m -s /bin/bash steam\n\ mkdir -p /home/steam/.local/share/Steam /tmp/xdg-steam\n\ +ln -sfn /home/steam/.local/share/Steam /home/steam/.steam\n\ chown -R steam:steam /home/steam /tmp/xdg-steam\n\ Xvfb :99 -ac -screen 0 1920x1080x24 &\n\ export DISPLAY=:99\n\ diff --git a/README.md b/README.md index 2406549..9020364 100644 --- a/README.md +++ b/README.md @@ -92,11 +92,16 @@ Moonlight использует `base_port` и вычисляет остальн Проверка прогресса для `player1`: ```bash -docker exec -it game-player-1 bash -lc 'tail -f /home/steam/.steam/debian-installation/logs/bootstrap_log.txt' +docker exec -it game-player-1 bash -lc 'tail -f /home/steam/.local/share/Steam/debian-installation/logs/bootstrap_log.txt' ``` После завершения первичной загрузки повторно откройте сессию Moonlight и запустите `Steam Big Picture`. +Если запуск Steam прерывается после выхода из терминала (`Hangup`), используйте лог: +```bash +docker exec -it game-player-1 bash -lc 'tail -f /home/steam/steam-app.log' +``` + ## Отладка Для проверки состояния контейнеров используйте: diff --git a/players/p1_config/apps.json b/players/p1_config/apps.json index be0a57d..2558e53 100644 --- a/players/p1_config/apps.json +++ b/players/p1_config/apps.json @@ -10,7 +10,7 @@ { "name": "Steam Big Picture", "detached": [ - "bash -lc 'id steam >/dev/null 2>&1 || useradd -m -s /bin/bash steam; mkdir -p /home/steam/.local/share/Steam /tmp/xdg-steam; chown -R steam:steam /home/steam /tmp/xdg-steam; runuser -u steam -- env DISPLAY=:99 HOME=/home/steam XDG_RUNTIME_DIR=/tmp/xdg-steam LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 /usr/games/steam -tenfoot -no-cef-sandbox -cef-disable-gpu -cef-disable-gpu-compositing'" + "bash -lc 'id steam >/dev/null 2>&1 || useradd -m -s /bin/bash steam; mkdir -p /home/steam/.local/share/Steam /tmp/xdg-steam; ln -sfn /home/steam/.local/share/Steam /home/steam/.steam; chown -R steam:steam /home/steam /tmp/xdg-steam; runuser -u steam -- nohup env DISPLAY=:99 HOME=/home/steam XDG_RUNTIME_DIR=/tmp/xdg-steam LANG=C LC_ALL=C /usr/games/steam -tenfoot -no-cef-sandbox -cef-disable-gpu -cef-disable-gpu-compositing >/home/steam/steam-app.log 2>&1 < /dev/null &'" ], "prep-cmd": [ { diff --git a/players/p2_config/apps.json b/players/p2_config/apps.json index be0a57d..2558e53 100644 --- a/players/p2_config/apps.json +++ b/players/p2_config/apps.json @@ -10,7 +10,7 @@ { "name": "Steam Big Picture", "detached": [ - "bash -lc 'id steam >/dev/null 2>&1 || useradd -m -s /bin/bash steam; mkdir -p /home/steam/.local/share/Steam /tmp/xdg-steam; chown -R steam:steam /home/steam /tmp/xdg-steam; runuser -u steam -- env DISPLAY=:99 HOME=/home/steam XDG_RUNTIME_DIR=/tmp/xdg-steam LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 /usr/games/steam -tenfoot -no-cef-sandbox -cef-disable-gpu -cef-disable-gpu-compositing'" + "bash -lc 'id steam >/dev/null 2>&1 || useradd -m -s /bin/bash steam; mkdir -p /home/steam/.local/share/Steam /tmp/xdg-steam; ln -sfn /home/steam/.local/share/Steam /home/steam/.steam; chown -R steam:steam /home/steam /tmp/xdg-steam; runuser -u steam -- nohup env DISPLAY=:99 HOME=/home/steam XDG_RUNTIME_DIR=/tmp/xdg-steam LANG=C LC_ALL=C /usr/games/steam -tenfoot -no-cef-sandbox -cef-disable-gpu -cef-disable-gpu-compositing >/home/steam/steam-app.log 2>&1 < /dev/null &'" ], "prep-cmd": [ { diff --git a/players/p3_config/apps.json b/players/p3_config/apps.json index be0a57d..2558e53 100644 --- a/players/p3_config/apps.json +++ b/players/p3_config/apps.json @@ -10,7 +10,7 @@ { "name": "Steam Big Picture", "detached": [ - "bash -lc 'id steam >/dev/null 2>&1 || useradd -m -s /bin/bash steam; mkdir -p /home/steam/.local/share/Steam /tmp/xdg-steam; chown -R steam:steam /home/steam /tmp/xdg-steam; runuser -u steam -- env DISPLAY=:99 HOME=/home/steam XDG_RUNTIME_DIR=/tmp/xdg-steam LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 /usr/games/steam -tenfoot -no-cef-sandbox -cef-disable-gpu -cef-disable-gpu-compositing'" + "bash -lc 'id steam >/dev/null 2>&1 || useradd -m -s /bin/bash steam; mkdir -p /home/steam/.local/share/Steam /tmp/xdg-steam; ln -sfn /home/steam/.local/share/Steam /home/steam/.steam; chown -R steam:steam /home/steam /tmp/xdg-steam; runuser -u steam -- nohup env DISPLAY=:99 HOME=/home/steam XDG_RUNTIME_DIR=/tmp/xdg-steam LANG=C LC_ALL=C /usr/games/steam -tenfoot -no-cef-sandbox -cef-disable-gpu -cef-disable-gpu-compositing >/home/steam/steam-app.log 2>&1 < /dev/null &'" ], "prep-cmd": [ { diff --git a/players/p4_config/apps.json b/players/p4_config/apps.json index be0a57d..2558e53 100644 --- a/players/p4_config/apps.json +++ b/players/p4_config/apps.json @@ -10,7 +10,7 @@ { "name": "Steam Big Picture", "detached": [ - "bash -lc 'id steam >/dev/null 2>&1 || useradd -m -s /bin/bash steam; mkdir -p /home/steam/.local/share/Steam /tmp/xdg-steam; chown -R steam:steam /home/steam /tmp/xdg-steam; runuser -u steam -- env DISPLAY=:99 HOME=/home/steam XDG_RUNTIME_DIR=/tmp/xdg-steam LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 /usr/games/steam -tenfoot -no-cef-sandbox -cef-disable-gpu -cef-disable-gpu-compositing'" + "bash -lc 'id steam >/dev/null 2>&1 || useradd -m -s /bin/bash steam; mkdir -p /home/steam/.local/share/Steam /tmp/xdg-steam; ln -sfn /home/steam/.local/share/Steam /home/steam/.steam; chown -R steam:steam /home/steam /tmp/xdg-steam; runuser -u steam -- nohup env DISPLAY=:99 HOME=/home/steam XDG_RUNTIME_DIR=/tmp/xdg-steam LANG=C LC_ALL=C /usr/games/steam -tenfoot -no-cef-sandbox -cef-disable-gpu -cef-disable-gpu-compositing >/home/steam/steam-app.log 2>&1 < /dev/null &'" ], "prep-cmd": [ {