Development:Configuration

From FEX-Emu Wiki
Jump to navigation Jump to search

FEX-Emu supports a layered configuration system that can be confusing to understand at face value. This is page to hopefully explain how FEX's configuration system works.

FEX Configuration layers

FEX supports multiple layers to its configuration. Many of which are available for users to modify to their liking.

List of layers - Lower layers overwriting configurations from upper layers

  • Global Primary configuration - Read-only
  • User Primary configuration
  • User Arguments configuration
  • Global application configuration - Read-only
  • User application configuration
  • User environment variable configuration

Global Primary configuration

/usr/share/fex-emu/Config.json

This configuration file is a global read-only configuration that is only used in very select circumstances. It is not expected that a user will need or want this since it is read-only.

This is FEX's standard JSON configuration format.

User Primary configuration

$HOME/.fex-emu/Config.json

This is the primary configuration file that is expected to be changed most frequently by the user. If the user is modifying configuration with FEXConfig, this is the file that should be saved.

This is FEX's standard JSON configuration format.

User Arguments configuration

FEXLoader arguments

This is a useful debugging interface that isn't expected to be used by most users. This allows quick toggling of options by passing arguments directly through command-line.

  • This interface isn't guaranteed to propagate argument options through to child processes, which can cause unexpected results
  • See FEXLoader --help or man FEX to see which arguments are available
    • If the guest application needs arguments as well, make sure to use -- to separate FEX arguments from the application arguments.

Global application configuration

/usr/share/fex-emu/AppConfig/<Application Name>.json

This is a read-only configuration for application specific options. These are usually workarounds or trivial workarounds that FEX needs for specific applications. It's not expected that a user will need to modify these.

This is FEX's standard JSON configuration format.

User application configuration

$HOME/.fex-emu/AppConfig/<Application Name>.json

This is a user provided application configuration. This is useful for users to set their own options for specific applications.

  • Very useful for only enabling Thunks for specific applications. Where global enabling can cause too many crashes.

This is FEX's standard JSON configuration format.

User environment variable configuration

Environment variables starting with FEX_

These are useful for testing various options without using FEXLoader arguments. While in most cases the environment variables will pass through to child processes. It still isn't guaranteed if the application is modifying the environment before executing a child process.

These can be found under man FEX under the ENVIRONMENT section. The environment name is just FEX_ prepended to an all capitalized json key name.