Legendary respects a small set of shell environment variables that control where it looks for configuration and data files. These variables are evaluated every time Legendary starts, before any config file is read, making them useful for switching between multiple accounts or setups without touching any files. In addition, per-gameDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/legendary-gl/legendary/llms.txt
Use this file to discover all available pages before exploring further.
[AppName.env] sections in config.ini let you inject arbitrary environment variables into a game’s launch environment — this is how you configure Wine, DXVK, and other runtime settings on Linux and macOS.
Legendary Environment Variables
LEGENDARY_CONFIG_PATH
Overrides the entire configuration directory Legendary uses. When set, Legendary will read its config.ini, installed.json, game metadata, and manifests from this directory instead of the default location.
XDG_CONFIG_HOME
If LEGENDARY_CONFIG_PATH is not set, Legendary respects the standard XDG Base Directory Specification. When XDG_CONFIG_HOME is set, Legendary places its configuration in a legendary/ subdirectory inside it:
LEGENDARY_CONFIG_PATH nor XDG_CONFIG_HOME is set, Legendary falls back to the hard-coded default:
LGDRY_WRAPPER
Sets the default --wrapper argument for legendary launch. Useful when you always want to launch games through a wrapper (such as gamemode) without passing the flag every time.
LGDRY_WINE_BINARY
Sets the default --wine argument for legendary launch on Linux and macOS. Equivalent to setting wine_executable in the [default] section of config.ini, but applied only for the current shell session.
LGDRY_WINE_PREFIX
Sets the default --wine-prefix argument for legendary launch on Linux and macOS. Equivalent to setting wine_prefix in the [default] section of config.ini for the current session.
LGDRY_NO_WINE
Sets the default --no-wine flag for legendary launch on Linux and macOS. Set to true to suppress Wine for the current session (e.g. when using a wrapper that handles Windows emulation itself).
Config Path Resolution Order
The config directory is resolved using this priority chain (first match wins):| Priority | Source | Resolved Path |
|---|---|---|
| 1 | LEGENDARY_CONFIG_PATH env var | $LEGENDARY_CONFIG_PATH/ |
| 2 | XDG_CONFIG_HOME env var | $XDG_CONFIG_HOME/legendary/ |
| 3 | Hard-coded default | ~/.config/legendary/ |
Setting
LEGENDARY_CONFIG_PATH to a directory that does not yet exist is fine — Legendary will create the necessary subdirectories (manifests/, metadata/, tmp/) on first run.Per-Game Environment Variables (in config.ini)
For game-specific environment variables — things like Wine prefixes, DXVK configuration, or any other runtime setting — Legendary uses dedicated[AppName.env] sections inside config.ini. Variables placed here are set in the process environment immediately before the game executable (or Wine) is launched.
[default.env] section sets variables for all games and is overridden key-by-key by any matching [AppName.env] entry:
Variables defined in
[AppName.env] override the same key in [default.env]. They also override any matching variable already set in your shell session — Legendary copies the current environment and then applies the config values on top before spawning the game process.| Variable | Use |
|---|---|
WINEPREFIX | Path to the Wine prefix for this game. |
WINEDEBUG | Wine debug channel filter (e.g. -all silences Wine debug output). |
DXVK_CONFIG_FILE | Path to a per-game dxvk.conf file. |
DXVK_LOG_PATH | Directory where DXVK writes its log files. |
VK_ICD_FILENAMES | Override the Vulkan ICD loader manifest (useful for multi-GPU setups). |
__GL_THREADED_OPTIMIZATIONS | NVIDIA threaded optimizations toggle. |
Related Pages
Config File Reference
Full reference for all config.ini sections and options.
Aliases
Create and manage short aliases for Epic app names.
Wine & Linux
Guide to configuring Wine prefixes and executables for Linux gaming.