377
edits
m (→Common paths) |
(Various fixes, following https://sourceforge.net/p/flightgear/mailman/message/34994540/ (my own posting, but acknowledged by James)) |
||
Line 2: | Line 2: | ||
[[File:Fghome-3.7.png|400px|right|Screen shot showing typical structure [[$FG_HOME]]]] | [[File:Fghome-3.7.png|400px|right|Screen shot showing typical structure [[$FG_HOME]]]] | ||
<code>'''$FG_HOME'''</code> is | <code>'''$FG_HOME'''</code> is an environment variable indicating the main location where user-specific FlightGear data is stored (not application data). <code>$FG_HOME</code> is a notable place were FlightGear data is written to, contrary to <code>$FG_ROOT</code>, which is generally read-only. | ||
<code>$FG_HOME</code> is | <code>$FG_HOME</code> is normally used to refer to the operating system specific location for some settings/folders. Its default value is determined by the <code>fgfs</code> binary during startup and is a directory that varies with the operating system supported by FG (Windows, OS X and Linux). ''It is [https://sourceforge.net/p/flightgear/mailman/message/34995089/ highly recommended] to rely on the default value (i.e., not setting <code>$FG_HOME</code> yourself in any way), unless you Really Know What You Are Doing™.'' | ||
{{note|The <code>/sim/fg-home</code> property should be considered read-only, for similar reasons why <code>$FG_HOME</code> shouldn't be explicitly set by users.}} | |||
{{note|FlightGear reads the <code>[[Fgfsrc]]</code> config file from <code>$FG_HOME</code> if it exists (<tt>fgfsrc</tt> without any leading dot), in addition to <tt>.fgfsrc</tt> from <code>$HOME</code> (with a leading dot in this case).}} | |||
{{note| | |||
{{note| | |||
== Content == | == Content == | ||
Line 17: | Line 15: | ||
You can determine the location of your <code>$FG_HOME</code> by using the [[property browser]] and checking the value of <code>/sim/fg-home</code>, but the usual paths are shown below. | You can determine the location of your <code>$FG_HOME</code> by using the [[property browser]] and checking the value of <code>/sim/fg-home</code>, but the usual paths are shown below. | ||
You can also use the [[Nasal Console]] to print out $FG_HOME: | You can also use the [[Nasal Console]] to print out <code>$FG_HOME</code>: | ||
<syntaxhighlight lang="nasal"> | <syntaxhighlight lang="nasal"> | ||
var path = getprop("/sim/fg-home"); | var path = getprop("/sim/fg-home"); | ||
Line 39: | Line 37: | ||
It is probably a good idea to have <code>~/Library/Application Support/FlightGear</code> saved on a Stickies note just in case you forget it. | It is probably a good idea to have <code>~/Library/Application Support/FlightGear</code> 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 | 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 <code>$FG_HOME/TerraSync</code> in the default configuration, see [[TerraSync]] for details. | ||
=== Windows === | === Windows === | ||
==== FlightGear 3.0 and later ==== | ==== FlightGear 3.0 and later ==== | ||
<code>%HOME% | <code>%HOME%\Documents\FlightGear</code> | ||
<code>%HOME%</code> is usually <code>C: | <code>%HOME%</code> is usually <code>C:\Users\''User name''</code> | ||
==== Before FlightGear 3.0 ==== | ==== Before FlightGear 3.0 ==== | ||
Line 55: | Line 51: | ||
== Use in troubleshooting == | == Use in troubleshooting == | ||
As one user once said, "When in doubt delete <code>$FG_HOME</code>". Many problems, including corrupted databases, broken TerraSync and many others can be fixed by deleting <code>fgfs_0.txt</code>, <code>fgfs.txt</code>, <code>terrasync_cache</code>, and the | As one user once said, "When in doubt delete <code>$FG_HOME</code>". Many problems, including corrupted databases, broken [[TerraSync]] and many others can be fixed by deleting <code>fgfs_0.txt</code>, <code>fgfs.txt</code>, <code>terrasync_cache</code>, and the [[Navdata cache|navdata cache]]. | ||
When you encounter problems, try deleting the files, but '''always''' keep the <code>fgfs.log</code> and <code>fgfs_0.log</code> log files to help in troubleshooting. | When you encounter problems, try deleting the files, but '''always''' keep the <code>fgfs.log</code> and <code>fgfs_0.log</code> log files to help in troubleshooting. |
edits