User:Mastan/XDG support

From PCGamingWiki, the wiki about fixing PC games

How to determine XDG support of a game in Linux[edit]

  1. Make XDG folders separate from your system's default: mkdir ~/xdg_config, mkdir ~/xdg_data.
    1. For Steam game: Put this line XDG_CONFIG_HOME=~/xdg_config XDG_DATA_HOME=~/xdg_data %command% into launch options.
    2. For non-Steam game: go to executable folder and run XDG_CONFIG_HOME=~/xdg_config XDG_DATA_HOME=~/xdg_data ./exename, where exename - executable file of a game.
  2. Run game, change settings and create saves.
  3. Look into folders ~/xdg_config and ~/xdg_data. If game created folders there, then XDG support is present. Replace ~/xdg_config with
    {{P|xdgconfighome}}
    and ~/xdg_data with
    {{P|xdgdatahome}}
    for proper XDG path when filling in game's data locations.
Games can have different XDG support for saves and configuration. Example: Frankenstein: Master of Death#Game_data.
Game creating folders in ~/.local/share/(default path for XDG_DATA_HOME) or ~/.config/(default path for XDG_CONFIG_HOME) does not necessary mean that game supports XDG, it can create folders there directly without using XDG environment variables.
Steam Cloud support may stop working if game uses XDG and custom folders are set, but Cloud information was not properly setup by developers(if they use default paths instead of proper XDG variables).
Bad example: Frankenstein: Master of Death#Save_game_data_location, Steam Cloud uses LinuxHome variable - see https://steamdb.info/app/347430/ufs/.
Good example: Full Throttle Remastered#Save_game_data_location, Steam Cloud uses LinuxXdgDataHome variable - see https://steamdb.info/app/228360/ufs/.