FlightGear configuration via XML

From FlightGear wiki
Jump to navigation Jump to search
Screen shot showing typical structure $FG_HOME

You can set up a FlightGear configuration via XML by creating a XML file that loads on top of FlightGear's other settings XML file, and replaces those setting values with your own preferences. This way, if you make a mistake, run into problems, or just want to restore settings to what they were you can simply remove your changes.

Next to using the graphical launcher or parsing console commands to FlightGear's binary, FlightGear's configuration can also be set by means of XML files.

autosave.xml

On startup, FlightGear reads both autosave.xml to find values for all configuration settings. FlightGear then stores these settings in the property tree after which the parts of FlightGear that need settings can use them. The file is a XML text file and you can easily read or edit them using a text editor. autosave.xml is a XML text file that contains changes to some settings contained in defaults.xml. Changes to these settings are saved between sessions. Location depends on the operating system used:

OS Path
Windows C:\Users\{Your username}\AppData\Roaming\flightgear.org\
Linux/macOS ~/.fgfs

Any changes you do within FlightGear's user interface are saved into autosave.xml, so a manual edit is, in most cases, not necessary. The next time you launch FGFS, the settings stored in autosave.xml will be used.

Adding your own settings

Rather than modifying defaults.xml or autosave.xml you should create your own configuration file using the same format and load it using the --config command-line parameter. This command-line option can also simply be entered in the launcher GUI. You are not limited only to use existing properties from those files, but can use any properties from the property tree. You can also add entirely new properties if that is needed.

Related content

References