Steam¶
We run Steam on our Linux desktops! Unfortunately, we don’t want to use AFS to
store Steam games for obvious reasons; they take up a lot of space and shouldn’t
be backed up. We would like, ideally, to allocate a partition on /var/games/steam
that has a lot of space and a single library shared between all possible users
(so we don’t have to keep downloading games).
Currently Arcturus has a prototype Steam setup working, read below for more details.
Prototype Multiuser Steam¶
The configuration we’re using here has some potential issues (see below), but appears to work well in testing.
Prerequisites¶
You need the following packages:
sudo apt-get install remctl-client python-remctl remctl-server
You should also create a system “steam” user. I set this user to have no homedir and login shell, but you could give it a home directory if necessary.
You should have a /var/games/steam partition set up. I recommend creating a SteamLibrary directory there, chowning it to the steam:steam user, and setting mode 777 on this, but the script we’re about to write will do that.
Obviously, you also need steam. Steam is in the nonfree Debian repositories and
should be installed by jhuacm-fun
. In fact I think the above remctl packages
are installed by a metapackage too, but just for completeness’s sake.
Scripts¶
You should land a script (I called it /usr/local/bin/steamed.sh on arcturus) that does the following:
#!/bin/bash
chmod -R 777 /var/games/steam/SteamLibrary
chown -R steam:steam /var/games/steam/SteamLibrary
You then want to “acquire” /afs/acm.jhu.edu/group/admins.pub/scripts/acm-steam-runner.py
.
You can put it in /usr/local/bin
if you want, but this isn’t necessary.
Modifying steam desktop files¶
You should change the steam .desktop files to use our launcher script acm-steam-runner.py
instead of the steam
binary directly.
remctl configuration¶
Land the following configuration in /etc/remctl/conf.d/steam
:
steam EMPTY /usr/local/bin/steamed.sh /etc/remctl/acl/anyuser
And this in /etc/remctl/acl/anyuser
:
pcre:.*@ACM.JHU.EDU
At this point, you should be good! Running acm-steam-runner.py
should do the right thing.
Details¶
The way this works is a little messy. Steam supports multiple Steam libraries, but the
configuration for them is entirely graphical. Occasionally this doesn’t play well with
AFS (i.e. Steam attemts to look at all the directories in /afs
it can…).
So, to solve the problem, I found the configuration that Steam spat out for a secondary
library. That looked like this, and it went into ~/.steam/steam/steamapps/libraryfolders.vpk
:
"LibraryFolders"
{
"1" "/var/games/steam/SteamLibrary"
}
I have no idea how long this will be the case, or how stable this configuration is. If it turns out to be unstable, we can always change what the script does in the future (the script writes this file in every user’s home directory).
The script then uses remctl to run the steamed.sh script above as local root, to ensure that the shared Steam library is writable and readable by all users. This is necessary because Steam writes files as the directory of the user that was running Steam. We want to ensure that all users can download and update games in the shared directory, not just the person who originally installed them.
Obviously, Steam DRM will prevent a user from trying to run a game they don’t own. But if two users own the same game, if one downloads it the other can now play it.
Issues¶
This obviously isn’t perfect, and it’s not guaranteed that it will continue working. If you can propose a better solution, feel free to do so! (Or go ahead and give it a try on a host that isn’t arcturus).