Skip to content

feat(steam): share game library with gaming users via bind mounts#16

Merged
hikaps merged 2 commits intodevelopfrom
feat/steam-library-sharing
Apr 26, 2026
Merged

feat(steam): share game library with gaming users via bind mounts#16
hikaps merged 2 commits intodevelopfrom
feat/steam-library-sharing

Conversation

@hikaps
Copy link
Copy Markdown
Owner

@hikaps hikaps commented Apr 26, 2026

Summary

  • Add Steam library folder sharing so gaming users don't need to re-download games already installed by the compositor user
  • Parse libraryfolders.vdf (text VDF format), mount steamapps/common via bind mounts, copy app manifests, and generate a target libraryfolders.vdf with full apps section so Steam recognizes installed games
  • Add settings toggle in the Steam section of Settings page
  • Gate on target user having launched Steam at least once (getTargetSteamUserId check)
  • Clean up shared state on session stop (restore minimal libraryfolders.vdf after bind mounts are torn down)

Changes

  • SteamConfigManager: SteamLibraryFolder struct, parseLibraryFoldersVdf, generateLibraryFoldersVdf (with apps/label/totalsize), shareLibraryToUser, cleanupLibrarySharing, loadLibraryFolders
  • SessionRunner: load library folders once before instance loop, call shareLibraryToUser per-instance, call cleanupLibrarySharing in stop()
  • SettingsPage: "Share game library with players" checkbox with tooltip

Technical details

  • Library 0 maps to target's Steam root; additional libraries go to ~/.couchplay/steam-libs/<i>/
  • Mount specs use "source|alias" format via CouchPlayHelperClient::mountSharedDirectories
  • ACLs set on source library paths via setPathAclWithParents
  • Generated VDF includes apps {} block with all source app IDs so Steam shows games as installed

@hikaps hikaps force-pushed the feat/steam-library-sharing branch from 74c521a to b59df1d Compare April 26, 2026 20:20
@hikaps hikaps merged commit 521059b into develop Apr 26, 2026
1 check passed
@hikaps hikaps deleted the feat/steam-library-sharing branch April 27, 2026 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant