A lightweight, defensive Bash utility for managing multiple Epic Games Launcher accounts on Linux/Wine. Swap accounts instantly without losing your login session or launcher settings.
EGSwitcher does not require, read, or store your Epic Games password, username, or email. It functions entirely by swapping local, ephemeral authentication tokens and configuration files generated by the Epic Launcher. Your credentials are never exposed to this tool.
- Portable & Resilient: A single-file executable that bootstraps its entire environment on first-run. Drop it anywhere in any supported environment and it will run. If config or state files are ever deleted, the self-healing bootstrap will regenerate them.
- Context-Aware Session Detection: Intuitively detects if you are logged into an unrecognised account. It offers to securely "claim" the current session to avoid data loss.
- Defensive Architecture: Defensively written, strictly validated, and battle-tested for edge cases. Extremely safe for newcomers.
- Atomic State Management: Uses isolated temporary files to ensure account switching is atomic. If a process is killed halfway through, changes are abandoned.
- WINE Native Integration: Uses the WINE API for session-safe termination.
- Smart Directory Detection: Uses WINE registry to accurately find the prefix's correct paths, with heuristic directory scanning as a fallback for unconventional setups.
- Interactive Configuration Wizard: Users can choose to edit a config file, or use the Interactive CLI prompts to modify their configuration.
- Strict XDG Compliance: Properly utilises XDG Base Directory specs for file management. This makes it easy to integrate into existing backup workflows.
Session Staleness: The Epic Games Launcher invalidates session tokens after a period of inactivity.
Common reports indicate up to 15 days, or up to 30 days with remember me selected. If you load an account that has passed this threshold, the stale session will be successfully swapped by EGSwitcher, and the launcher will likely prompt you to re-authenticate.
To prevent this, you should periodically cycle through all your swapped accounts to keep the session tokens fresh. (A contingency feature for this is planned for 1.1.0).
-
Download the latest release
-
Make Executable: chmod +x ./egs
-
Add to Path (Optional): mv ./egs ~/.local/bin/
-
Configure Prefix: egs config pfx
- and enter the full path to your Epic Games Launcher WINE/Proton prefix
egs new [name]
egs new my-new-account(or justegs newto be prompted)
- If an unrecognised session is active, it will prompt you to claim it.
- Relaunch the Epic Launcher and log in to your account
- Type
yinto the prompt
egs save [name]
- Run:
egs save my-account - Or run:
egs save - If an unrecognised session is active, it will prompt you to claim it.
egs load <name>
- Run:
egs load my-alt-account
- If an unrecognised session is active, it will prompt you to claim it.
- Launch the game
egs unload
- If an unrecognised session is active, it will prompt you to claim it.
egs list
egs rename <old> <new>
- Run:
egs rename my-old-name my-new-name
egs delete <name>
- Run:
egs delete my-crap-account
egs config pfx [/path/to/prefix]
For persistent change:
- Run:
egs config pfxand follow the prompt- Note: Must be an absolute path (e.g.
/home/username/.wine). Cannot use~/or envars (e.g.$HOME).
- Note: Must be an absolute path (e.g.
- Or run:
egs config pfx "$HOME/.wine/"- Note: Can use envars in path (e.g.
$HOME/.wineor$WINEPREFIX). Cannot use~/.
- Note: Can use envars in path (e.g.
- Or edit:
~/.config/egswitcher/egswitcher.conf:EGS_PFX='/home/username/.wine/'- Note: Must be an absolute path (e.g.
/home/username/.wine). Cannot use~/or envars (e.g.$HOME).
- Note: Must be an absolute path (e.g.
To change for a single run:
- Run:
EGSPFX="/path/to/prefix" egs [command]- Note: Can use envars in path (e.g.
$HOME/.wineor$WINEPREFIX). Cannot use~/.
- Note: Can use envars in path (e.g.
egs config debug [1|0]
To enable for a single run:
- Run:
EGSDEBUG=1 egs [command]
To enable persistent debugging:
- Run:
egs config debug 1 - Or edit
~/.config/egswitcher/egswitcher.conf:EGS_DEBUG=1
egs -h|--help
- Run:
egs - Or run:
egs -h - Or run:
egs --help
EGSwitcher follows the XDG Base Directory Specification. All files and directories are created automatically as required. If you wish to backup or inspect your data, they are located here:
- Account Data:
$XDG_DATA_HOME/egswitcher/(Defaults to~/.local/share/egswitcher/) - Config Files:
$XDG_CONFIG_HOME/egswitcher/(Defaults to~/.config/egswitcher/) - Cache/Temp Files:
$XDG_CACHE_HOME/egswitcher/(Defaults to~/.cache/egswitcher/)
Tip
If these environment variables are not set on your system, it falls back to the standard hidden directories in your $HOME.
- WINE or Proton
- rsync
- coreutils
Copyright © 2025 doccy-doc License: GPL-3.0-only See License
SPDX-License-Identifier: GPL-3.0-only