steam-acc-switcher
A small CLI for switching between your saved Steam accounts on Linux.
It works the way Steam actually works on Linux: it edits the two plain-text VDF files Steam reads at startup to decide who to auto-login as. It doesn't touch passwords or 2FA.
Why
Because I have too many Steam accounts for playing Yugioh and Steam's own account picker only shows 5 accounts.
How it works
Steam picks its auto-login account from two files:
<steam_root>/config/loginusers.vdf, which has one block per account keyed by SteamID64. The active account is the one withMostRecentset to"1".~/.steam/registry.vdf, the Linux stand-in for the Windows registry.AutoLoginUser(an AccountName) underRegistry/HKCU/Software/Valve/Steamis what Steam logs into.
A switch does four things: locate the files, cleanly shut Steam down, edit both files, then relaunch Steam.
Steam must be fully closed before writing, because it rewrites loginusers.vdf on exit and would clobber the change. The tool sends a clean steam -shutdown (not a kill), waits for the process to disappear, and aborts rather than risk corruption if Steam won't quit. Each file is backed up (.bak) and written atomically before being replaced.
It auto-detects native, Flatpak, and Snap installs.
Prerequisite (one-time, per account)
You need to have logged into each account at least once with "Remember password" checked. That's what creates the saved-credential token (ssfn*) files this tool relies on. The switcher only flips which saved account is active. It never stores or types passwords or 2FA codes.
Install
Requires Python 3.10+.
The easiest way is to install it as an isolated CLI tool, which puts sas and
steam-acc-switcher on your PATH:
# with uv (https://docs.astral.sh/uv/)
uv tool install steam-acc-switcher
# or with pipx
pipx install steam-acc-switcher
To install with plain pip instead:
pip install steam-acc-switcher
Or from a local checkout of this repo:
pip install .
Usage
Make sure "Ask which account to use each time Steam starts" is unchecked in Steam's settings, otherwise it will override the switcher. You can see it when you click your username, then "Change account...".
# Run with no arguments for the interactive picker. Your saved accounts are
# listed (active one starred), use ↑/↓ to move, Enter to switch, q to cancel.
sas
# Enrich the menu with online state / VAC status (public profile lookup).
sas --online
# Switch directly by AccountName or nickname (case-insensitive), skipping the menu.
sas alice
# Skip confirmation prompts.
sas alice --yes
# Relaunch Steam minimized to the tray (passes -silent to steam).
sas alice --silent
# Verbose output for debugging.
sas alice --verbose
In the interactive picker, press r to give the highlighted account a nickname
(blank to clear). Nicknames show up in the menu and can be used as switch targets,
e.g. sas Main.
sas and steam-acc-switcher are equivalent. You can also run it without installing via python -m sas.
Note: switching closes and reopens Steam, so save your game and exit any running game first.
Notes
- VDF key casing varies between Steam versions (
mostrecentvsMostRecent); keys are read and written case-insensitively, preserving existing casing. - The
--onlineenrichment uses Steam's publichttps://steamcommunity.com/profiles/<id>?xml=1endpoint, needs no auth, and fails gracefully when offline. - Account state lives in Steam's own VDF files; the tool never touches credentials. The only thing it stores of its own is the optional nickname map, keyed by SteamID64, at
~/.config/sas/nicknames.json(honoringXDG_CONFIG_HOME).
Metadata
Release files for steam-acc-switcher 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| steam_acc_switcher-0.1.5.tar.gz | 36.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| steam_acc_switcher-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 63.2 kB
Release files / steam_acc_switcher-0.1.5.tar.gz
| Download URL | steam_acc_switcher-0.1.5.tar.gz |
|---|---|
| Size | 36.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
647f5fb0c9cec45d016fecb50a32b79bb3aed29acfd4740186c7c4c426af2934
|
|
BLAKE2b-256 checksum How to use checksums |
4032307872aecb730afeaba0226512a74f66921d88ea0ed3bfdc34afb3ef23cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / steam_acc_switcher-0.1.5-py3-none-any.whl
| Download URL | steam_acc_switcher-0.1.5-py3-none-any.whl |
|---|---|
| Size | 27.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9272a07271f8bdd7cc4fccf14da31a5849e097cc767291b1a25ba06ba978aa6f
|
|
BLAKE2b-256 checksum How to use checksums |
50d6bb80fe43e2d7ef8a4f846f233aa979ca1078cf6d30b76b44d0fb21318b70
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|