Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

steam-launch-options

Bulk manage launch options for all your Steam games from the command line.

No more clicking through each game's properties — set gamemoderun %command%, mangohud %command%, or any wrapper for your entire library in one command.

Why?

Steam doesn't have a "global launch options" setting. If you want GameMode, MangoHud, or any other wrapper applied to all games, you have to set it per-game through the GUI. This tool edits Steam's localconfig.vdf directly to apply options in bulk.

The LD_PRELOAD Anti-Pattern

A common workaround is adding LD_PRELOAD=libgamemodeauto.so.0 to Steam's .desktop file. Don't do this. It preloads the library into Steam itself and all its ~12 child processes (steamwebhelper, crashpad, zygotes, etc.), causing D-Bus assertion failures that can prevent Steam from launching entirely:

dbus[762495]: arguments to dbus_pending_call_block() were incorrect,
assertion "pending != NULL" failed in file dbus-pending-call.c line 768.
This is normally a bug in some application using the D-Bus library.

The correct approach is gamemoderun %command% in per-game launch options — which activates GameMode only for the actual game process. This tool makes that trivial to apply globally.

Installation

# Clone
git clone https://github.com/Zendorea/steam-launch-options.git
cd steam-launch-options

# Install (symlink to PATH)
chmod +x steam_launch_options.py
sudo ln -sf "$(pwd)/steam_launch_options.py" /usr/local/bin/steam-launch-options

# Or just run directly
./steam_launch_options.py --help

Requirements

  • Python 3.8+
  • No external dependencies (stdlib only)

Usage

⚠️ Close Steam before running add or remove commands. Steam overwrites localconfig.vdf on exit, so changes made while it's running will be lost.

Add a wrapper to all games

# GameMode (recommended for all games on Linux)
steam-launch-options add "gamemoderun %command%"

# MangoHud + GameMode
steam-launch-options add "mangohud gamemoderun %command%"

This is idempotent — games that already have the wrapper are skipped.

Remove a wrapper from all games

steam-launch-options remove "gamemoderun %command%"

List games and their options

# Summary
steam-launch-options list

# Show games that have custom launch options
steam-launch-options list --with-options

Restore from backup

Every modification creates a timestamped backup automatically. To undo:

steam-launch-options restore

How It Works

Steam stores per-game settings in:

~/.local/share/Steam/userdata/<STEAMID>/config/localconfig.vdf

This is a Valve KeyValues (VDF) file. The tool:

  1. Parses the VDF tree
  2. Navigates to UserLocalConfigStore.Software.Valve.Steam.apps
  3. For each app ID, reads/modifies the LaunchOptions field
  4. Serializes back to VDF format

The VDF parser handles the full format spec (nested sections, quoted strings, escape sequences, comments).

Behavior Details

  • Preserves existing options: If a game already has custom launch options (e.g., -vulkan), the wrapper is prepended, not clobbered
  • Smart detection: Won't double-add a wrapper that's already present
  • Backup rotation: Keeps the last 10 backups, auto-cleans older ones
  • Multi-user support: Auto-detects user ID, or specify with --user
  • App name resolution: Reads appmanifest_*.acf files for human-readable game names in list output

Multiple Users

If you have multiple Steam accounts:

steam-launch-options --user 61648312 add "gamemoderun %command%"

Safety

  • A backup is always created before any modification
  • The tool refuses to run if Steam is detected as running (override with --force)
  • Use steam-launch-options restore to instantly undo

Prior Art

License

GPL-3.0 — see LICENSE.

About

Bulk manage launch options for all Steam games — gamemoderun, mangohud, etc. without per-game clicking

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages