St34m
How to run/manage Steam quickly and easily, even under a secondary user. The code for st34m is freely available on Psi, our Git repository.
Prerequisites
We assume you've already installed Steam. If you plan on running Steam under its own user account, create it first . This document will assume you created a user named "stmuser". Make sure your primary user can do sudo commands as the secondary user and root, of the form of:
sudo -u stmuser -- * sudo chown root: /tmp/dumps sudo chmod 700 /tmp/dumps sudo rm -rf /tmp/dumps
This isn't required as you can run the st34m script in a single-user setup , but this script is vastly overkill for that.
If you're using PulseAudio you may need to allow multiple users to use it at the same time.
Setup
First you'll need to download the st34m script. It's a bash script that handles half of the logic for maintaining a Steam install, which can download the secondary script under the account of your choosing. I recommend installing large untrusted applications under their own user accounts, so if something goes horribly wrong in the app itself it's easy to kill the whole stack. It also has security benefits as the application can be denied access to your other user's files.
As an aside, you should never just download and run scripts. For the love of $DEITY at least glance through the code before blindly running it. The latest versions of both can be found here.
Download st34m scripts
wget https://psi.cynop.me/Caffarius/st34m/raw/branch/master/st34m.sh -O ./st34m.sh chmod 700 ./st34m.sh ./st34m.sh -u stmuser -i
Running Steam
Just launch Steam
./st34m.sh -u stmuser
Hide to tray (for startup)
./st34m.sh -u stmuser -t
Running games
To launch a game after you've installed Steam and aforementioned game, run the following command:
./st34m.sh -u stmuser -g test
Substituting "test" for the game of you choice (unless you like glxgears). See -g for the game selections.
So for example, Civilization VI would be:
./st34m.sh -u stmuser -g 289070
Single-user
If you must...
Download and install
wget https://mage.cynop.me/download/st34m -O ./st34m.sh chmod 700 ./st34m.sh ./st34m.sh -i
Run Steam
./st34m.sh
Launch Steam to tray
./st34m.sh -t
Launch a game
See -g for the game selections.
./st34m.sh -g 289070
Script options
Usage: ./st34m.sh -g (game) -u (user) -dvknptchi
-g
Launches the game of your choice. Test will launch glxgears. Some examples are provided in the script, but others can be added. Without modifying the script it will assume you've provided it a Steam app id (which can be found in the store, all apps are of the format: store.steampowered.com/app/APPID).
./st34m.sh -g 289070
Game List | ||
---|---|---|
Game | -g (game) names | |
glxgears | test | |
Ashes of the Singularity: Escalation | 507490 | ashes |
Civilization VI | 289070 | civ6 |
Civilization: Beyond Earth | 65980 | civbe |
Dynasty Warriors 8 | 278080 | dw8 |
Elite Dangerous | 359320 | elite |
Fallout 4 | 377160 | fo4 |
Homeworld Remastered | 244160 | hw |
MechWarrior Online | 342200 | mwo |
Sins of a Solar Empire | 204880 | sins |
-u
Runs Steam as the user that is specified.
./st34m.sh -u stmuser
-d
Turns the debug messages on. This also turns on the verbose messages. Debug is the most verbose setting, offering the slowest performance but the most diagnostic output. Unlike verbose, debug also turns on the debug output of Wine/wineboot/Setup/DXVK upgrades.
./st34m.sh -d
-v
Turns on verbose messages. This option is redundant if debug is also selected. Shows more script output and also gives the messaging for protontricks.
./st34m.sh -v
-k
Kill all processes for a user (if it isn't the current user or root). Comes in very handy if something's going wrong and you're running Steam as suggested under a secondary user account. Instead of being stuck at a frozen whatever, murder it all.
./st34m.sh -u stmuser -k
-p
Protontricks mode. Runs protontricks under the requested game's prefix. The game must be specified first or protontricks won't know what to select.
./st34m.sh -g 507490 -p
-t
Attempts to hide Steam to the system tray on launch. Specifically for auto-start launches. This is the default action when selecting "Launch Steam minimized to the system tray" in Steam Settings under Windows upon login.
./st34m.sh -t
-n
No BS mode. Forcibly doesn't launch an application. Will not launch Steam and will ignore any games selected (even test). Useful for the paranoid when running protontricks/console/et al (in fact, st34m-run will auto-set this when some modes are selected). Often superfluous.
./st34m.sh -n
-c
Launch a console session as the specified user. This session is dbus connected and setup via xhost, so it's completely capable of launching games and other GUI applications as the specified user.
./st34m.sh -u stmuser -c
-h
Displays the help message. Basically a less verbose version of this page.
./st34m.sh -h
-i
Install the secondary script, st34m-run. The first script you download basically handles when to clean up extra processes and sanitize input for st34m-run. The -i
option will download and configure the st34m-run script automatically. By default, st34m will download this to /home/${runas_user}/.script/st34m-run.sh
.
./st34m.sh -i