Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Shared Steam directory for different users
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gamers & Players
View previous topic :: View next topic  
Author Message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 3366
Location: de

PostPosted: Tue Mar 05, 2024 1:06 pm    Post subject: Shared Steam directory for different users Reply with quote

Hi there,

I built a gaming computer for my son. And of course I want to be able to play with this computer too.

So first I installed Lutris and specified as base directory: /opt/games

To be able to use this directory with different users:
Code:

mkdir /opt/games
groupadd games
gpasswd -a userA games
gpasswd -a userB games
chown root:games /opt/games
chmod 2775 /opt/games

The last line should grant the access to every user in the games group and inherit the group rights.

But unfortunately that doesn't work.

Steam installs the Steam contents into ~/.local/share/Steam

If I move this directory to /opt/games and fix the permissions and ownership, steam complains: libsteamui.so not found., although I've changed the install directory in the Steam UI. And after moving the Steam directory. Steam doesn't start anymore. Btw. Lutris doesn't even find Steam.

The next step was only to move the steamapps directory to /opt/games and keep the other Steam stuff in the User Home directory. But after changing the ownerships any installed game (e.g. Stumble Guys) starts and starts over but crashes after 2 seconds.

My goal:
  • 2 user accounts
  • 2 steam accounts
  • 1 shared directory for the game installation (in order to not to install every game twice)
  • Save games stored in the User directory


Is that possible somehow?
Back to top
View user's profile Send private message
kgdrenefort
Guru
Guru


Joined: 19 Sep 2023
Posts: 314
Location: Somewhere in the 77

PostPosted: Wed Mar 06, 2024 1:11 pm    Post subject: Reply with quote

Hi,

Might said something stupid here, but are you sure Lutris can access /opt ?

What are the permissions, user and group owner for /opt and /opt/game aswell ?

I sometimes put things in /opt too, IIRC I have this:

Quote:

kgdrenefort@Mephistopheles /etc/portage $ ls -la /
(… … …)
drwxr-xr-x 11 kgdrenefort kgdrenefort 159 14 févr. 15:13 opt


Quote:
kgdrenefort@Mephistopheles /etc/portage $ ls -la /opt
total 12
drwxr-xr-x 11 kgdrenefort kgdrenefort 159 14 févr. 15:13 .
drwxr-xr-x 18 root root 281 28 févr. 13:00 ..
drwxr-xr-x 2 root root 135 25 févr. 00:04 bin
drwxr-xr-x 5 kgdrenefort kgdrenefort 39 3 janv. 14:10 bup
drwxr-xr-x 4 root root 4096 13 févr. 09:14 discord
drwxr-xr-x 5 root root 41 3 nov. 10:17 dwarf-fortress
drwxr-xr-x 14 kgdrenefort kgdrenefort 4096 29 oct. 10:39 lagrange
drwxr-xr-x 8 root root 78 13 janv. 08:34 rust-bin-1.74.1
drwxr-xr-x 4 root root 4096 9 janv. 13:32 skypeforlinux
drwxr-xr-x 3 root root 28 14 nov. 09:39 spotify
drwxr-xr-x 3 kgdrenefort kgdrenefort 25 5 déc. 12:03 tor-browser


If I were you, I would not give root:games, maybe games:games and set your both users on the same groups (games) and be sure groups it's 'rwx' to allow full access. So far as I know, this directory can safely be authorized to whom ever you want. But I don't see the point to make the main user root. Can be wrong here. Give it a try.

Hope this is useful.

Regards,
GASPARD DE RENEFORT Kévin
_________________
Traduction wiki, pour praticiper.
Custom logos/biz card/website.
Back to top
View user's profile Send private message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 3366
Location: de

PostPosted: Thu Mar 07, 2024 10:39 am    Post subject: Reply with quote

kgdrenefort wrote:
If I were you, I would not give root:games, maybe games:games and set your both users on the same groups (games) and be sure groups it's 'rwx' to allow full access. So far as I know, this directory can safely be authorized to whom ever you want. But I don't see the point to make the main user root.


root isn't the point here. It will be overwritten by every user, who writes something in this directory. As you mentioned the group games with permssions rwxrws--- should be the relevant part. The set-gid bit should be responsible to inherit the group rights.

And lutris is started with user permissions. So it can write to /opt/games.

It should be something inside Steam, which denies the usage of directories shared by local users.

On the other hand:
You can use 2 Steam accounts parallel within 1 user account. Means, I can start the steam runtime and switch the steam users inside Steam. But this feature doesn't respect the users of the computer of course.
Back to top
View user's profile Send private message
Ralphred
l33t
l33t


Joined: 31 Dec 2013
Posts: 668

PostPosted: Fri Mar 08, 2024 8:07 am    Post subject: Re: Shared Steam directory for different users Reply with quote

musv wrote:

My goal:
  • 2 user accounts
  • 2 steam accounts
  • 1 shared directory for the game installation (in order to not to install every game twice)
  • Save games stored in the User directory


Is that possible somehow?


Kind of: "Save games stored in the User directory" are taken care of by steam, game saves will be separate to each "steam account", even with the same user.

"1 shared directory for the game installation" doesn't work 100% with 2 system user accounts, you set it up by just installing steam locally for each user, then pointing to /opt/games/SteamLibrary as the default game installation destination. The problem is that during updates steam will create files with user:usergrp ownership, then upon switching system user you'll get permission errors.

There are two ways round this:
  • Wrap steam, so on start-up permissions for /opt/games/SteamLibrary/ are updated to g+rw and :games
  • Create a 'gamer' user that both system users run steam as, that way the permissions will always be 'correct'


Personally, I wrapped steam so the lad didn't mess with my own "steam settings per game", and the only time I had to install things twice was if we used multiseat and were playing the same game at the same time.
Back to top
View user's profile Send private message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 3366
Location: de

PostPosted: Wed Mar 13, 2024 3:27 pm    Post subject: Reply with quote

Thanks. I'll check it in the next days.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gamers & Players All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum