13,212
edits
Hamzaalloush (talk | contribs) mNo edit summary |
(Major copy editing; Rewriting portions, mostly the lead section; +rel: FlightGear configuration via XML) |
||
Line 1: | Line 1: | ||
The '''<code>.fgfsrc</code>''' file is an [http://www.catb.org/jargon/html/R/rc-file.html rc-file] that contain [[command line options]] that are read by FlightGear at startup. This is useful if you often start FlightGear using the same command line options. | |||
It is very likely that this file does not exist on your system yet, and therefore has to be created by | == Creating the file == | ||
It is very likely that this file does not exist on your system yet, and therefore has to be created by you. The contents of the file are handled the same way by FlightGear on all operating systems, but the name and location is not: | |||
* on ''GNU/Linux'' the file is called | * on ''GNU/Linux'' the file is called <code>.fgfsrc</code>. Note the leading period! FlightGear is looking for it inside the $HOME directory of the user. To figure out where this is on your system, open a terminal window (shell) and enter <code>cd $HOME</code>.<!-- | ||
<!-- ''Mac OS X'' = POSIX? --> | ''Mac OS X'' = POSIX? --> | ||
* On Mac OS X, the same as GNU/Linux. A Terminal window is placed on /Applications/Utilities/Terminal.app | * On Mac OS X, the same as GNU/Linux. A Terminal window is placed on <code>/Applications/Utilities/Terminal.app</code> | ||
* On ''Windows'' systems the file is called <code>fgfsrc</code> and lives in [[$FG_HOME]] which, on a standard installation for FlightGear 3.0 and later, with Vista and later can be found under <code>C:\Users\{username}\AppData\Roaming\flightgear.org</code>. | |||
=== Multiple files for different purposes === | |||
A simple way to have more than one setup is to replace <code>.fgfsrc</code> by a link which can be changed according to the setup one wants to load. On a GNU/Linux system this could look like | |||
A simple way to have more than one setup is to replace | |||
ls -l ~/.fgfsrc* | ls -l ~/.fgfsrc* | ||
... /home/user/.fgfsrc -> .fgfsrc.cvs | ... /home/user/.fgfsrc -> .fgfsrc.cvs | ||
Line 16: | Line 16: | ||
... /home/user/.fgfsrc.cvs | ... /home/user/.fgfsrc.cvs | ||
== Rules for file contents == | |||
* The file is plain text (ASCII), like saving a <code>.txt</code> file with Wordpad. | |||
* Each line only contains one option. | |||
* Lines with a leading <code>#</code> are treated as a comment and will be ignored by FlightGear. | |||
* Use comments following an option (like <code>--some-option # Some comment</code>) with care. At least with strings containing <code>--prop=</code> options this will cause FlightGear to fail. | |||
* Variables, such as <code>$HOME</code> or [[$FG_HOME]] in paths are not resolved. | |||
== | == Example files == | ||
Have in mind, that ''at least'' the local paths (like <code>fg-root</code> and <code>fg-scenery</code>) and the [[multiplayer]] options have to be altered to work on your system! | |||
# $HOME/.fgfsrc | # $HOME/.fgfsrc | ||
Line 105: | Line 101: | ||
--prop:/input/mice/mouse/mode/button[2]/binding/value=2 | --prop:/input/mice/mouse/mode/button[2]/binding/value=2 | ||
=== Some specific properties === | |||
Some options (mostly properties) are only of temporary interest to most users or even users running a development version of FlightGear: | |||
* <code>--prop:/sim/traffic-manager/use-custom-scenery-data=true</code><ref>See {{forum link|p=42156|hilit=parking+positions|text=forum}} and [http://sourceforge.net/mailarchive/message.php?msg_id=20114927 mailing list] for more info on this.</ref> | |||
{{note|With Git version (and probably 2.4.0 as well) the below option can only be used together with the <code>--disable-real-weather-fetch</code> option!}} | |||
* <code>--random-wind # Not in 1.9.1 and former versions</code> | |||
Nice turbulences during approaches. ;-) | |||
===== | === Using fgfsrc for debugging === | ||
For debugging purposes, like when using <code>gdb</code>, it might be easier for you to arrange a <code>.fgfsrc</code> with minimal options enabled. See [[troubleshooting crashes]] for further info. A template for a debug <code>.fgfsrc</code> file could for example be: | |||
{{note|You will have to direct <code>--fg-root</code> towards your <code>$FGDATA</code> folder.}} | |||
<syntaxhighlight lang="text"> | <syntaxhighlight lang="text"> | ||
Line 156: | Line 156: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Please feel free to add other useful options to the temporary and basic ones!!! | |||
== Foot notes and references == | |||
<references/> | |||
== Related content == | |||
=== Wiki articles === | |||
* [[FlightGear configuration via XML]] | |||
=== Development mailing list threads === | |||
== | |||
* http://www.mail-archive.com/search?q=fgfsrc&l=flightgear-devel%40lists.sourceforge.net | * http://www.mail-archive.com/search?q=fgfsrc&l=flightgear-devel%40lists.sourceforge.net | ||
* http://www.mail-archive.com/search?l=flightgear-devel%40flightgear.org&q=fgfsrc&submit.x=0&submit.y=0 | * http://www.mail-archive.com/search?l=flightgear-devel%40flightgear.org&q=fgfsrc&submit.x=0&submit.y=0 |