Skip to main content

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:

  1. <steam_root>/config/loginusers.vdf, which has one block per account keyed by SteamID64. The active account is the one with MostRecent set to "1".
  2. ~/.steam/registry.vdf, the Linux stand-in for the Windows registry. AutoLoginUser (an AccountName) under Registry/HKCU/Software/Valve/Steam is 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...".

Steam's prompt for changing accounts

# 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 (mostrecent vs MostRecent); keys are read and written case-insensitively, preserving existing casing.
  • The --online enrichment uses Steam's public https://steamcommunity.com/profiles/<id>?xml=1 endpoint, 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 (honoring XDG_CONFIG_HOME).

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

steam_acc_switcher-0.1.5.tar.gz (36.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

steam_acc_switcher-0.1.5-py3-none-any.whl (27.1 kB view details)

Uploaded Python 3

File details

Details for the file steam_acc_switcher-0.1.5.tar.gz.

File metadata

  • Download URL: steam_acc_switcher-0.1.5.tar.gz
  • Upload date:
  • Size: 36.1 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for steam_acc_switcher-0.1.5.tar.gz
Algorithm Hash digest
SHA256 647f5fb0c9cec45d016fecb50a32b79bb3aed29acfd4740186c7c4c426af2934
MD5 824931483bf75464b2272804f37078e9
BLAKE2b-256 4032307872aecb730afeaba0226512a74f66921d88ea0ed3bfdc34afb3ef23cb

See more details on using hashes here.

File details

Details for the file steam_acc_switcher-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: steam_acc_switcher-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 27.1 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for steam_acc_switcher-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 9272a07271f8bdd7cc4fccf14da31a5849e097cc767291b1a25ba06ba978aa6f
MD5 f73ee04288f08f6b92fef229ea828c8c
BLAKE2b-256 50d6bb80fe43e2d7ef8a4f846f233aa979ca1078cf6d30b76b44d0fb21318b70

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page