From 2ac7d6898daa245d9390d50bc05af4e509762185 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 20 Jun 2026 12:53:50 +0000 Subject: [PATCH] wolf: seed Steam libraryfolders.vdf into session dirs after first install MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After app injection + docker compose restart, Wolf creates per-app session dirs under /etc/wolf//Steam. Wait up to 30s for those dirs to appear, then copy the pre-built libraryfolders.vdf into each one so Steam sees the game storage location on its very first launch — no manual setup needed. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01D8ckUJQtj1pH8jtAddBDZs --- services/wolf.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/services/wolf.sh b/services/wolf.sh index c185aca..fb7c97f 100644 --- a/services/wolf.sh +++ b/services/wolf.sh @@ -1499,6 +1499,33 @@ if not added and not updated: PYEOF docker compose restart wolf log_success "Wolf restarted with updated config" + + # Seed Steam library config so games go to game storage on first launch. + # Wolf creates session dirs after the restart; wait up to 30s for them. + if echo "$APP_KEYS" | grep -qw steam; then + log_info "Waiting for Wolf session dirs to appear..." + local _sw + for _sw in $(seq 1 30); do + compgen -G "/etc/wolf/[0-9]*/Steam" >/dev/null 2>&1 && break + sleep 1 + done + local _INSTALL_VDF="$GAME_STORAGE_DIR/steam/steamapps/libraryfolders.vdf" + if [ -f "$_INSTALL_VDF" ]; then + local _seeded=0 + for _wdir in /etc/wolf/[0-9]*/Steam; do + [ -d "$_wdir" ] || continue + mkdir -p "$_wdir/.local/share/Steam/steamapps" + cp "$_INSTALL_VDF" "$_wdir/.local/share/Steam/steamapps/libraryfolders.vdf" + chown -R 1000:1000 "$_wdir" + ((_seeded++)) + done + if [ "$_seeded" -gt 0 ]; then + log_success "Steam library config seeded — games will install to $GAME_STORAGE_DIR/steam" + else + log_warning "Steam session dir not found yet. Run: ./manage.sh fix-perms after first Moonlight connection." + fi + fi + fi else log_warning "Wolf config not generated in time. Add apps manually to /etc/wolf/cfg/config.toml" log_warning "Then run: ./manage.sh apps"