Hi fellow wiki editors!

To help newly registered users get more familiar with the wiki (and maybe older users too) there is now a {{Welcome to the wiki}} template. Have a look at it and feel free to add it to new users discussion pages (and perhaps your own).

I have tried to keep the template short, but meaningful. /Johan G


Jump to: navigation, search


4,550 bytes added, 27 April
Fix case of fgfsrc, otherwise it won't work on case-sensitive filesystems (which is the case of most filesystems on Linux and traditional Unices)
'''<!-- Broken image [[File:Fghome.png|400px|right|Screen shot showing structure of [[$FG_HOME''' is an environment variable representing the path to where user]] ]] -specific data is stored (not application data). Basically, it is a name for a directory that varies with the operating system and stores information between sessions->[[File: configuration/preferences, properties marked with the "userFghome-archive" attribute and aircraft-specific settings (using the data helper class in aircraft3.nas)7. png|400px|right|Screen shot showing typical structure [[$FG_HOME]]]]
<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 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|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).}} == Content ==In <code>$FG_HOME</code> is information stored between sessions. That information is for example configuration/preferences, properties marked with the <code>user-archive</code> attribute and aircraft-specific settings (using the data helper class in <code>aircraft.nas</code>). <code>$FG_HOME</code> is also the location for the SQLite-based [[Navdata cache|navdata cache]]. ==Common paths==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 <code>$FG_HOME</code>:<syntaxhighlight lang="nasal">* '''Linuxvar path = getprop("/sim/fg-home");print("Your $FG_HOME is at:''' ", path);</syntaxhighlight> The <code>/sim/</code> property subtree is also the place where you can find other folders, such as <code>fg-root</code>, <code>fg-scenery</code> and the current working directory (<code>fg-current</code>). === Linux ===<code>~/.fgfs/</code>* '''=== Mac OS X:''' ===<ttcode>~/Library/Application Support/FlightGear</ttcode> (to learn more about viewing hidden folders, see [http://www.mikesel.info/show-hidden-files-mac-os-x-10-7-lion/]): 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: <code>~/Library/Application Support/FlightGear</code> : 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 stored in <code>$FG_HOME/TerraSync</code> in the default configuration, see [[TerraSync]] for details.* '''=== Windows:======= FlightGear 3.0 and later ====<code>%userprofile%\Documents\FlightGear</code> <code>%userprofile%</code> is <code>%homedrive%\Users\''User name'' <tt/code> by default, and <Code>%homedrive%</code> is usually C:\. ==== Before FlightGear 3.0 ====<code>%APPDATA%\flightgear.org\</ttcode>: <code>%APPDATA% </code> is another environment variable that depends on your Windows version. On XP and older, it can be found under <ttcode>C:\Documents and Settings\{username}''User name''\Application Data</ttcode>. On Vista and later it can be found under <ttcode>C:\Users\{username}''User name''\AppData\Roaming</ttcode>. The folder is hidden by default; see . See [http://windows.microsoft.com/en-US/windows-vista/show-hidden-files these instructions] to unhide show the folder. == 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 [[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. == Power Users ==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.<ref>{{cite web |url = https://forum.flightgear.org/viewtopic.php?p=304170#p304170 |title = <nowiki> Re: Is it possible to install multiple instanes of FG in Win </nowiki> |author = <nowiki> zakalawe </nowiki> |date = Jan 25th, 2017 |added = Jan 25th, 2017 |script_version = 0.40 }}</ref>  == Related content ===== Wiki articles ===* [[FlightGear configuration via XML]]* [[$FG_ROOT]]* [[Property browser]]* [[Properties persistent between sessions]]
[[Category:Special directories|HOME]]

Navigation menu