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

# 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

# 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.2.tar.gz (35.3 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.2-py3-none-any.whl (26.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: steam_acc_switcher-0.1.2.tar.gz
  • Upload date:
  • Size: 35.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","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.2.tar.gz
Algorithm Hash digest
SHA256 6b7c5d5ea58204c15fe6f5d7ef2ad0fa0b996395acc3f0a4a4475712c60e5339
MD5 afc2951d2611f639c0c3b2a68e226fc6
BLAKE2b-256 810617c0a648f0a68b57fee018c60deddb863ba6c1c342662ce562d8173aaddd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: steam_acc_switcher-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 26.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 32041f35035de452aa340c6756cc227867bf69a4e44e48ebba118580ea4df2d9
MD5 be98c8bc79c6bbdcb75ab80b0bd91383
BLAKE2b-256 09f46beb5e0ad0fdb37f983690ea419a1a1c62ae2c261d506a06dc61b6f0f2bb

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

This release

0.1.2 This release

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