wolf: seed Steam libraryfolders.vdf into Wolf session home dir
Steam reads libraryfolders.vdf from /home/retro/.local/share/Steam/steamapps/ which Wolf serves from /etc/wolf/<session-id>/Steam/. Seeding it only in /mnt/games/steam/steamapps/ was ignored since Steam doesn't know to look there. - Seed the VDF into any existing /etc/wolf/<id>/Steam session dirs at install time - manage.sh fix-perms now propagates the VDF from game storage into every Wolf session dir so running fix-perms is the one-command remedy on existing installs Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D8ckUJQtj1pH8jtAddBDZs
This commit is contained in:
+29
-6
@@ -701,10 +701,12 @@ UDEV
|
||||
"$GAME_STORAGE_DIR/firefox" "$GAME_STORAGE_DIR/minecraft" \
|
||||
"$GAME_STORAGE_DIR/kodi" "$GAME_STORAGE_DIR/emulators"
|
||||
|
||||
# Pre-seed Steam library config so it uses /mnt/games/steam on first launch
|
||||
# without requiring the user to navigate Settings → Storage inside Steam.
|
||||
cat > "$GAME_STORAGE_DIR/steam/steamapps/libraryfolders.vdf" << 'VDFEOF'
|
||||
"libraryfolders"
|
||||
# Pre-seed Steam library config. Wolf mounts each app's home from
|
||||
# /etc/wolf/<id>/Steam — Steam reads libraryfolders.vdf from there.
|
||||
# We stash a copy in game storage and manage.sh fix-perms propagates it
|
||||
# into every Wolf session dir after Wolf has run once.
|
||||
local _VDF_CONTENT
|
||||
_VDF_CONTENT='"libraryfolders"
|
||||
{
|
||||
"0"
|
||||
{
|
||||
@@ -713,8 +715,17 @@ UDEV
|
||||
"mounted" "1"
|
||||
"contentid" "1"
|
||||
}
|
||||
}
|
||||
VDFEOF
|
||||
}'
|
||||
mkdir -p "$GAME_STORAGE_DIR/steam/steamapps"
|
||||
echo "$_VDF_CONTENT" > "$GAME_STORAGE_DIR/steam/steamapps/libraryfolders.vdf"
|
||||
# Also seed into any Wolf session dirs that already exist
|
||||
for _wdir in /etc/wolf/[0-9]*/Steam; do
|
||||
[ -d "$_wdir" ] || continue
|
||||
mkdir -p "$_wdir/.local/share/Steam/steamapps"
|
||||
echo "$_VDF_CONTENT" > "$_wdir/.local/share/Steam/steamapps/libraryfolders.vdf"
|
||||
chown -R 1000:1000 "$_wdir"
|
||||
done
|
||||
|
||||
# Pre-create ES-DE ROM directories so the user knows where to drop files
|
||||
# and ES-DE shows the system in its list immediately on first launch.
|
||||
local _ESDE_SYSTEMS=(
|
||||
@@ -1204,6 +1215,18 @@ PYEOF
|
||||
echo " fixed: $GAME_DIR"
|
||||
found=1
|
||||
fi
|
||||
# Propagate the Steam library seed into every Wolf session home so Steam
|
||||
# uses /mnt/games/steam rather than defaulting to /home/retro.
|
||||
if [ -n "$GAME_DIR" ] && [ -f "$GAME_DIR/steam/steamapps/libraryfolders.vdf" ]; then
|
||||
for _wdir in /etc/wolf/[0-9]*/Steam; do
|
||||
[ -d "$_wdir" ] || continue
|
||||
sudo mkdir -p "$_wdir/.local/share/Steam/steamapps"
|
||||
sudo cp "$GAME_DIR/steam/steamapps/libraryfolders.vdf" \
|
||||
"$_wdir/.local/share/Steam/steamapps/libraryfolders.vdf"
|
||||
sudo chown -R 1000:1000 "$_wdir"
|
||||
echo " seeded libraryfolders.vdf → $_wdir"
|
||||
done
|
||||
fi
|
||||
[ "$found" = 0 ] && echo " Nothing to fix (no Wolf app dirs found yet)."
|
||||
echo "Done. Reconnect from Moonlight to relaunch the app."
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user