ValveSoftware / steam-for-linux

Issue tracking for the Steam for Linux beta client
4.23k stars 174 forks source link

Using multiple users on the same machine, games are downloaded in duplicity #3942

Open crlsgms opened 9 years ago

crlsgms commented 9 years ago

Well, I came to this with a computer that have 3 users, and after I setup a gpu on it, its possible to play some games, but we all have our own users / desktop envirionments already setup, and after tf2 ran just fine, the other user logged on steam on his user, and the game started downloading from scratch.

On another computer that I build to stay on my living room, the windows users are setup so they go straight to big picture, and if some games are owned / shared between the users they are all there, on program files/steamapps/common.

Searchin arround I found some suggestions:

Well, for me its an issue since on windows its quite simple the program_files approach, but the /home/user/.steam on linux just blocks the possibility to a multi user machine to avoid downloading the games in duplicity. Maybe there are some workarround but I didnt manage to get it working. I tried this on a 64b Linux Mint 17.1.

kon14 commented 9 years ago

What I do is I've set up a steam slave user on my machine to handle steam (under my own user's xsession).

I'm also using a unix socket for pulseaudio so as to be capable of accessing steam's (user) audio streams through my xsession and my own user's pavucontrol. The method to follow is described here, just make sure you use a unix socket rather than a tcp one for less overhead (described in Peter Funk's comment). Using pulseaudio in system-wide mode is problematic, insecure, cpu/ram intense and disables important featrures too so stay clear from it, sockets is the way to go.

I personally don't have to worry about multiple human users accessing steam, though that should probably work in your case, unless you require multiseat (which afaik doesn't work without tricks in windows either) in which case you're going to require some kind of sandbox in order to launch multiple instances of the steam client. There are some tricks you could resort to in order to launch multiple steam instances (different users) at the same time though I doubt you're going to need multiseat anyway. right?

Moving on to the how-to:

I also have a small documentation text file I wrote concerning the setup in case I screw everything up and need to reconfigure, I'd be glad to provide it if you so desire. Hope you get this working, I understand I'm a bit late.

Apart from all the above I believe you could indeed setup a shared steam directory, yet I haven't taken the time to consider the requirements myself.

crlsgms commented 9 years ago

Thanks for your posting kon14, but it wont solve the issue I tryed to point for this matter.

What Im trying to achive, since steam have the family share options, indoor streaming and some other features focusing on the use of steam by multiple users / family members / friends, on the living room (suposing there would be a steam box, or a pc with steamos installed, not a bunch of pcs next to the TV)

Thinking on this path, to get an example If I have 3 kids and setup a pc on the living room for them, and each kid want his achievements in awesonauts for example, using the already mutli user big picture login, they will choose their own user to login, and play the game.

On windows it works fine. Pcs boots to big picture, the kid chooses its user, plays the game. On *nix / steamOS the game will vainly be downloaded again in duplicity, burdening the HD unnecessarily. It easily turns the focus on steamOS on the living room useless on a big family / house environment, where for now any windows install that boots into big picture seems more smart on hd usage than the linux version of steam.

crlsgms commented 9 years ago

After some chattin on irc, theres another point I need to documment:

The issue is more regarding a public computer, where users have their own system account to do all sorts of tasks on the computer, but when they would play something on steam the games they can access are only the ones on their own system folders, not only their personal configurations as on windows, that the games are all stored on the program_files/steam/common folders

Oxalin commented 8 years ago

@crlsgms I may have a solution for you. What you'll need to do is to create a folder shared by the multiple Steam users. You'll have to add this folder in Steam and set it as the default installation folder. If needed, you'll be able to move your installed games to that shared folder so you don't have to download everything again.

First, you'll create a common folder, we'll call it "steam", somewhere accessible to everybody, let's say under "/opt/". So, you'll have "/opt/steam" where all the games of each of your users will be installed.

Now, for the next step, you may be faced with two different contexts:

Finally, under each of your Steam users, you'll add the common folder as a new library folder: Steam->View->Settings->Downloads->Content Libraries, click on "STEAM LIBRARY FOLDERS" / ADD LIBRARY FOLDER / find your folder (in my example, /opt/steam).

Now, when you download a new game, a Steam user has to select the common folder and VOILA! Steam will see the content of games that are already installed and will use it; otherwise, Steam will install the game there, ready to be added for your other Steam users.

For help with your distribution on how you may create a group and so on, contact me in private with the distribution's name and version.

thepowersgang commented 8 years ago

I administer a large set of machines (10 desktops, with 5 currently linux and 5 windows) shared by around 60 people (active members of a university computer society).

All users have home directories served over NFS, so not only is installing games to the home directory duplicating data, it's also exceptionally slow.

The solution I've come to is to allow steam itself to be installed to ~/.steam or to ~/.local/share/Steam and set up a symbolic link to /opt/steamapps (which is kept world-writable by a cronjob).

This solution works, but often requires manual intervention for each user (when steam is newly installed, the symbolic link doesn't exist).

Idea

A preferable solution would be something similar to the steam service on windows that is in charge of installing games and managing permissions on the steamapps directory (either keeping them at world write-execute or allowing readonly access to normal users if the game allows it).

alexbarcelo commented 8 years ago

As someone who has (very recently) a multi-seat (2 seats and 2 users, SO and me) and often plays Steam, I will give my two cents.

First of all, the filesystem centric idea, already commented by @thepowersgang, of (ab)using symbolic links in the steamapps folder is reasonable. Instead of doing the whole steamapps maybe I would do the common. I am not sure the purpose of all the folders and files in steamapps, and the big chunk of disk is used only by the common folder, so I thought that maybe it was safer that way. As the name indicates, I hope that the files there will be only the "common" files, wouldn't they?

Well... I have tested Talos and Battleblock. Install for two users, run them, stop, and look. Battleblock has identical common/Battleblock* folders (good!), but Talos has diverged because it uses some Log and Temp folders. That makes me cringe a little bit, because this means that maybe it is not safe to do this "common files" approach for all games and probably it is not safe to run simultaneously the game from two seats (different users, ofc).

dottgonzo commented 6 years ago

+1

SuperSamus commented 1 year ago

Related: https://github.com/ValveSoftware/Proton/issues/4820.