$FG HOME: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
mNo edit summary
(Cleanup; + Related wiki articles)
Line 1: Line 1:
<!-- Broken image [[File:Fghome.png|400px|right|Screen shot showing structure of [[$FG_HOME]] ]] -->
<code>'''$FG_HOME'''</code> is a placeholder variable representing the path to where user-specific FlightGear data is stored (not application data). Unlike <code>[[$FG_ROOT]]</code>, <code>$FG_HOME</code> is '''not''' an environment variable that needs to be configured for FlightGear to work. <code>$FG_HOME</code> is the only place were FlightGear data is written to as <code>$FG_ROOT</code> is generally read-only.


[[File:Fghome.png|400px|right|Screen shot showing structure of [[$FG_HOME]] ]]
<code>$FG_HOME</code> is only used to refer to the operating system specific location for some settings/folders. The actual location of <code>$FG_HOME</code> 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).


'''$FG_HOME''' is a placeholder variable representing the path to where user-specific FlightGear data is stored (not application data). Unlike $FG_ROOT, $FG_HOME is NOT an environment variable that needs to be specifically configured for FlightGear to work. $FG_HOME is the only place were FlightGear data is written to, $FG_ROOT is generally read-only.
{{note|<code>$FG_HOME</code> and the <code>/sim/fg-home</code> property should be considered read-only, because they cannot be affected during startup or at runtime.}}
{{note|The <code>[[Fgfsrc]]</code> config file will not actually be saved in <code>$FG_HOME</code>, but just in <code>$HOME</code>}}


$FG_HOME is only used to refer to the OS-specific location for some settings/folders. The actual location of $FG_HOME will be determined by the fgfs binary during startup, it is a name for a directory that varies with the various operating systems supported by FG (Windows, OSX and Linux) and it stores information between sessions, such as: configuration/preferences, properties marked with the "user-archive" attribute and aircraft-specific settings (using the data helper class in aircraft.nas). $FG_HOME is also the location for the SQLite-based [[Navdb|NavDB cache]].
== Content ==
In <code>$FG_HOME</code> is information stored between sessions.  That information is foe 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 [[Navdb|NavDB cache]].


($FG_HOME and the '''/sim/fg-home''' property should be considered read-only, because they cannot be affected during startup or at runtime)
== 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.


'''Note that the [[Fgfsrc]] config file will not actually be saved in $FG_HOME, but just in $HOME'''
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>).
===Common paths===
* '''Linux:''' ~/.fgfs/
* '''Mac OS X:''' <tt>~/Library/Application Support/FlightGear</tt> (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:  ~/Library/Application Support/FlightGear
: 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 also stored inside the user's home folder, in the 'only' location we are permitted to write too, $HOME/Library/Application Support/FlightGear. To be technical, that's the value of '$FG_HOME', which is where we store all temporary / user-local data such as saved prefs, TerraSync files and aircraft-specific config state. The OSX launcher doesn't actually set this path (any more), this location is the default used by FlightGear itself. You can of course override these paths and set FG_HOME or the TerraSync path manually, from the command line or a config file, but the defaults should 'do what you want'.


* '''Windows:'''
=== Linux ===
:* FlightGear 3.0 and later: <tt>%HOME%/Documents/FlightGear</tt>
<code>~/.fgfs/</code>
:: %HOME% is usually <tt>C:/Users/{YourUserName}</tt>
 
:* Before FlightGear 3.0: <tt>%APPDATA%\flightgear.org\</tt>
=== Mac OS X ===
:: %APPDATA% is another environment variable that depends on your Windows version. On XP and older, it can be found under <tt>C:\Documents and Settings\{username}\Application Data</tt>. On Vista and later it can be found under <tt>C:\Users\{username}\AppData\Roaming</tt>. The folder is hidden by default; see [http://windows.microsoft.com/en-US/windows-vista/show-hidden-files these instructions] to unhide the folder.
<code>~/Library/Application Support/FlightGear</code> (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 also stored inside the user's home folder, as it is the '''only''' location we are permitted to write too, <code>$HOME/Library/Application Support/FlightGear</code>, which technically is the value of <code>$FG_HOME</code>.
 
The OS X launcher doesn't actually set this path (any more), this location is the default used by FlightGear itself. You can of course override these paths and set <code>$FG_HOME</code> or the TerraSync path manually, from the command line or a configuration file, but the default paths should do what you need.
 
=== Windows ===
==== FlightGear 3.0 and later ====
<code>%HOME%/Documents/FlightGear</code>
 
<code>%HOME%</code> is usually <code>C:/Users/''User name''</code>
 
==== Before FlightGear 3.0 ====
<code>%APPDATA%\flightgear.org\</code>
 
<code>%APPDATA%</code> is another environment variable that depends on your Windows version. On XP and older, it can be found under <code>C:\Documents and Settings\''User name''\Application Data</code>. On Vista and later it can be found under <code>C:\Users\''User name''\AppData\Roaming</code>. The folder is hidden by default. See [http://windows.microsoft.com/en-US/windows-vista/show-hidden-files these instructions] to 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 Navaids database.
 
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.
 
== Related content ==
=== Wiki articles ===
* [[FlightGear configuration via XML]]
* [[$FG_ROOT]]
* [[Property browser]]
* [[Properties persistent between sessions]]


You can determine the location of your $FG_HOME by using the [[Property browser|property tree browser]] and checking the value of '''/sim/fg-home''', the '''/sim/''' branch is also the place where you can find other folders, such as fg-root, fg-scenery and the current working directory (fg-current).
==Use in Troubleshooting==
As one user once said, "When in doubt delete $FG_HOME files". Very many problems, including corrupted databases, broken terrasync, and many others, can be fixed by deleting fgfs_0.txt, fgfs.txt, terrasync_cache, and Navaids database.
When you encounter problems, try deleting the files, but ALWAYS keep the fgfs and fgfs_0 log files to help in troubleshooting.
[[Category:Special directories|HOME]]
[[Category:Special directories|HOME]]

Revision as of 08:37, 25 October 2015

$FG_HOME is a placeholder variable representing the path to where user-specific FlightGear data is stored (not application data). Unlike $FG_ROOT, $FG_HOME is not an environment variable that needs to be configured for FlightGear to work. $FG_HOME is the only place were FlightGear data is written to as $FG_ROOT is generally read-only.

$FG_HOME is only used to refer to the operating system specific location for some settings/folders. The actual location of $FG_HOME 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).

Note$FG_HOME and the /sim/fg-home property should be considered read-only, because they cannot be affected during startup or at runtime.
Note  The Fgfsrc config file will not actually be saved in $FG_HOME, but just in $HOME

Content

In $FG_HOME is information stored between sessions. That information is foe example configuration/preferences, properties marked with the user-archive attribute and aircraft-specific settings (using the data helper class in aircraft.nas). $FG_HOME is also the location for the SQLite-based NavDB cache.

Common paths

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.

The /sim/ property subtree is also the place where you can find other folders, such as fg-root, fg-scenery and the current working directory (fg-current).

Linux

~/.fgfs/

Mac OS X

~/Library/Application Support/FlightGear (to learn more about viewing hidden folders, see [1])

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: ~/Library/Application Support/FlightGear

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 also stored inside the user's home folder, as it is the only location we are permitted to write too, $HOME/Library/Application Support/FlightGear, which technically is the value of $FG_HOME.

The OS X launcher doesn't actually set this path (any more), this location is the default used by FlightGear itself. You can of course override these paths and set $FG_HOME or the TerraSync path manually, from the command line or a configuration file, but the default paths should do what you need.

Windows

FlightGear 3.0 and later

%HOME%/Documents/FlightGear

%HOME% is usually C:/Users/User name

Before FlightGear 3.0

%APPDATA%\flightgear.org\

%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 fgfs_0.txt, fgfs.txt, terrasync_cache, and the Navaids database.

When you encounter problems, try deleting the files, but always keep the fgfs.log and fgfs_0.log log files to help in troubleshooting.

Related content

Wiki articles