$FG_HOME is an environment variable indicating the main location where user-specific FlightGear data is stored (not application data).
$FG_HOME is a notable place were FlightGear data is written to, contrary to
$FG_ROOT, which is generally read-only.
$FG_HOME is normally used to refer to the operating system specific location for some settings/folders. Its default value is determined by the
fgfs binary during startup and is a directory that varies with the operating system supported by FG (Windows, OS X and Linux). It is highly recommended to rely on the default value (i.e., not setting
$FG_HOME yourself in any way), unless you Really Know What You Are Doing™.
| Note The |
| Note FlightGear reads the |
$FG_HOME is information stored between sessions. That information is for example configuration/preferences, properties marked with the
user-archive attribute and aircraft-specific settings (using the data helper class in
$FG_HOME is also the location for the SQLite-based navdata cache.
You can determine the location of your
$FG_HOME by using the property browser and checking the value of
/sim/fg-home, but the usual paths are shown below.
You can also use the Nasal Console to print out
var path = getprop("/sim/fg-home"); print("Your $FG_HOME is at: ", path);
/sim/ property subtree is also the place where you can find other folders, such as
fg-scenery and the current working directory (
Mac OS X
~/Library/Application Support/FlightGear (to learn more about viewing hidden folders, see )
As all future FlightGear versions will take their preferences from here, it is a good idea to have their access available easily.
Desktop/Finder/Go/Go to Folder is where you need to start.
When given the option, input:
It is probably a good idea to have
~/Library/Application Support/FlightGear saved on a Stickies note just in case you forget it.
If you want/need to refer to any of these files frequently, you could make an alias of a file, or the whole folder, and place it somewhere easier to access. TerraSync data is stored in
$FG_HOME/TerraSync in the default configuration, see TerraSync for details.
FlightGear 3.0 and later
%homedrive%\Users\User name by default, and
%homedrive% is usually C:\.
Before FlightGear 3.0
%APPDATA% is another environment variable that depends on your Windows version. On XP and older, it can be found under
C:\Documents and Settings\User name\Application Data. On Vista and later it can be found under
C:\Users\User name\AppData\Roaming. The folder is hidden by default. See these instructions to show the folder.
Use in troubleshooting
As one user once said, "When in doubt delete
$FG_HOME". Many problems, including corrupted databases, broken TerraSync and many others can be fixed by deleting
terrasync_cache, and the navdata cache.
When you encounter problems, try deleting the files, but always keep the
fgfs_0.log log files to help in troubleshooting.
Note you can also override FG_HOME in the environment, to have totally distinct installs - this would be my recommend approach to running multiple versions in parallel. (The installers will always replace the stable / dev version as other commenters pointed out, so you can't use those so easily, you need to copy files around - I'm nota Windows expert so I don't know if there something that could be changed or improved here) If you start multiple instances (the same version or different) of FGFS using the same value of FG_HOME (whether that be the default or a custom one), we use a lock file to ensure only one (the first) has write access. The rest will go into read-only mode, and as you can maybe guess, treat FG_HOME as read-only. Sharing of aircraft / scenery is entirely about which paths are configured, BTW. However, one final caveat is that having multiple instances both running TerraSync, using the same terrasync dir, would likely act a bit funny. It ought to actually work, but it might download some things twice, and it's not a tested or supported configuration for the moment.