You are not logged in.

#1 2025-10-29 14:13:00

MonolithImmortal
Member
From: Atlanta, GA
Registered: 2011-01-29
Posts: 12

Has anyone found a straightforward way to share a Steam Library betwee

So for context, both my son and I have user profiles on my gaming PC’s and both have our own steam accounts. We have family sharing enabled between us. By default Steam installs games in the /home/ directory so if my son and I wanted to play the same game it would install twice, once in his /home/son/ directory, and also in /home/dad/ for me.

What I’ve done so far that seems to work is create a user group “gamers”, assign both of our accounts to the “gamers” group, create a btrfs subvolume at /steam-library/ (so as to not include it in snapshots), give the gamers group read write privileges to that directory and then point steam at that location for its storage. That works EXCEPT that whoever installed the game winds up with ownership of the compdata for the game and when you launch a game without ownership of the compdata it immediately crashes at launch.

So when switching between profiles, I have to rename the /steam-library/steam/steamapps/compdata/whatever# folder for the game I want to play to whatever#.sonbak or whatever#.dadbak (depending on which profile generated the compdata and then rename our respective backup folders to their default name.

This works, and if no one has a more straight-forward solution I’m just going to write a bash script that runs on launch of our respective user accounts to automatically do the directory renaming. This may just be a quirk of wine/proton that there isn’t a more straight forward/elegant solution, but I thought I’d just ask.


Dental CAD designer, bodybuilder, arch linux enthusiast.

Offline

#2 2025-10-29 14:59:46

schard
Forum Moderator
From: Hannover
Registered: 2016-05-06
Posts: 2,459
Website

Re: Has anyone found a straightforward way to share a Steam Library betwee

If it's about file permissions, have you tried ACLs?.


Inofficial first vice president of the Rust Evangelism Strike Force

Offline

#3 2025-10-29 21:21:50

MonolithImmortal
Member
From: Atlanta, GA
Registered: 2011-01-29
Posts: 12

Re: Has anyone found a straightforward way to share a Steam Library betwee

No I haven't but after thinking about it some more I think what I'm going to do is symlink the /steamapps/compatdata folder to our respective home dirrectories and have a bash script execute on login that automatically deletes the preexisting symlink and creates a new one to the home compatdata folder for our respective user profile. When I get some free time I'll set it up, verify it works, and then follow up here with a complete guide on how to achieve a multi user singular steam library.

Last edited by MonolithImmortal (2025-10-29 21:22:35)


Dental CAD designer, bodybuilder, arch linux enthusiast.

Offline

#4 2025-10-30 15:14:13

MonolithImmortal
Member
From: Atlanta, GA
Registered: 2011-01-29
Posts: 12

Re: Has anyone found a straightforward way to share a Steam Library betwee

Ok, after testing this method out, this probably is the most efficient way to have a singular shared Steam library so games only have to install once, yet maintain a separate set of proton prefixes/compatibility data per user.

This is what I did that works or me.

sudo btrfs subvolume create /steam-library #I wanted a separate btrfs subvolume to avoid games being captured in snapper snapshots, if using another filesystem or backup system adjust accordingly
sudo groupadd gamers
sudo chgrp gamers /steam-library/
sudo usermod -a -G gamers user1 #set your own user name here, and then run again with any other users you want to add
sudo chmod -R 770 /steam-library/
sudo chmod -R g+rwX
sudo find /steam-library -type d -exec chmod g+s {} +

Next, open up Steam, then settings, then storage and point your storage to /steam-library/ and install your games there.

Now we need to symlink the /steam-library/steamapps/compatdata to your user directory.

Open your preferred text editor, copy and paste this bash script, save it wherevever you prefer in your home directory as something like steam-compatdata-symlink.sh

#!/bin/bash
# Sets Steam compatdata symlink to ~/.steam/steam/steamapps/compatdata at login

SHARED_COMPAT="/steam-library/steamapps/compatdata"      # Sets variable to point at shared Steam Library compatdata folder
USER_COMPAT="/home/$(whoami)/.steam/steam/steamapps/compatdata"  # Sets variable to point to home directory compatdat folder

# Ensure user's personal compatdata folder exists
mkdir -p "$USER_COMPAT"

# Safely remove existing target (handles symlink, file, or directory)
if [ -L "$SHARED_COMPAT" ] || [ -f "$SHARED_COMPAT" ]; then
    rm -f "$SHARED_COMPAT"
elif [ -d "$SHARED_COMPAT" ]; then
    rm -rf "$SHARED_COMPAT"
fi

# Create new symlink to user's personal compatdata
if ln -s "$USER_COMPAT" "$SHARED_COMPAT"; then
    # Verify symlink (for debugging)
    if [ -L "$SHARED_COMPAT" ] && [ "$(readlink "$SHARED_COMPAT")" = "$USER_COMPAT" ]; then
        echo "Steam compatdata symlink set successfully for $(whoami)."
    else
        echo "Error verifying symlink for $(whoami)." >&2
    fi
else
    echo "Error creating symlink for $(whoami). Check permissions on parent dir." >&2
fi

Once it's saved, make it executable with chmod +x ~/path/to/script.sh
In my case

chmod +x ~/steam-compatdata-symlink.sh 

Now test it by running it your terminal.

~/steam-compatdata-symlink.sh

If you get a success message, you're ready to move on to adding it to your auto launch at login apps. Depending on your DE/WM your options here may differ. I'm using KDE so I simply opened  system settings, searched for auto start, clicked Add New, login script, and then selected my symlink script.

You're going to have to do this for every user in your gamers group. Log out of your user profile, log in to theirs, and recreate the bash script, make it executable, test it, and then set it to auto run at login for each user.

This should work to keep everyone always have steam look at their home compatdata folder for proton prefixes and compatibility data while keeping the actual game installs shared and not having to be redundant per user. Mind you it only works cleanly so long as one user is logged in at a time.

Last edited by MonolithImmortal (2025-10-30 15:31:38)


Dental CAD designer, bodybuilder, arch linux enthusiast.

Offline

#5 2025-11-25 11:12:36

Arni Miller
Member
From: USA
Registered: 2025-11-25
Posts: 3
Website

Re: Has anyone found a straightforward way to share a Steam Library betwee

I had a similar situation when I tried to share a single Steam library between different users. And yes, it is Proton/compdata that breaks the scheme, because there is a hard link to the owner of the directory. If you run the game from outside the compdata owner, it crashes—unfortunately, this is normal behavior. At first, I also tried playing around with permissions, ACLs, and groups, but in the end, I came to the same conclusion as you: either separate compdata for each user or a workaround with renaming/scripting. So your script option is actually the simplest and most effective solution. I made a similar hook that simply switches the compdata folder to the desired user upon login. It works stably and without surprises.
If Proton ever learns to work with ACL, the problem will disappear, but so far it doesn't know how.


I'm Arnie, manager at the sports nutrition supplement store Trensteroid4you https://trensteroid4you.com Every day, I advise athletes on everything from A to Z, and I love learning about new digital services that make work and life easier.

Offline

#6 2025-11-30 20:40:02

joltman
Member
From: Colorado
Registered: 2014-04-09
Posts: 6

Re: Has anyone found a straightforward way to share a Steam Library betwee

Arni Miller wrote:

I had a similar situation when I tried to share a single Steam library between different users. And yes, it is Proton/compdata that breaks the scheme, because there is a hard link to the owner of the directory. If you run the game from outside the compdata owner, it crashes—unfortunately, this is normal behavior. At first, I also tried playing around with permissions, ACLs, and groups, but in the end, I came to the same conclusion as you: either separate compdata for each user or a workaround with renaming/scripting. So your script option is actually the simplest and most effective solution. I made a similar hook that simply switches the compdata folder to the desired user upon login. It works stably and without surprises.
If Proton ever learns to work with ACL, the problem will disappear, but so far it doesn't know how.

Would you be able to post that code too?  I'm building my son's first gaming PC that I'd like to share at times. Both of these scripts will help me save space.  Thanks!

Offline

Board footer

Powered by FluxBB