From FlightGear wiki
Jump to navigation Jump to search

The .fgfsrc file is an 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.

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 .fgfsrc. 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 cd $HOME.
  • On Mac OS X, the same as GNU/Linux. A Terminal window is placed on /Applications/Utilities/Terminal.app
  • On Windows systems the file is called fgfsrc and lives in $FG_HOME which, on a standard installation for FlightGear 3.0 and later, with Vista and later can be found under C:\Users\{username}\AppData\Roaming\flightgear.org.

Multiple files for different purposes

A simple way to have more than one setup is to replace .fgfsrc by a link which can be changed according to the setup one wants to load. On a GNU/Linux system this could look like

ls -l ~/.fgfsrc*
... /home/user/.fgfsrc -> .fgfsrc.cvs
... /home/user/.fgfsrc.1.9.1
... /home/user/.fgfsrc.cvs

Rules for file contents

  • The file is plain text (ASCII), like saving a .txt file with Wordpad.
  • Each line only contains one option.
  • Lines with a leading # are treated as a comment and will be ignored by FlightGear.
  • Use comments following an option (like --some-option # Some comment) with care. At least with strings containing --prop= options this will cause FlightGear to fail.
  • Variables, such as $HOME or $FG_HOME in paths are not resolved.

Example files

Have in mind, that at least the local paths (like fg-root and fg-scenery) and the multiplayer options have to be altered to work on your system!

# $HOME/.fgfsrc
### Aircraft
 ## Catalina, dhc3[A/F], p47d-30, F1-156-de, ZivkoEdge540 
 ## MPcarrier: nimitz, nimitz-ATC, nimitz_observer, foch, vinson, eisenhower
### Initial position
# In air:
# Coordinates:
 ## Oilrig Lennox:
### Environment
 ## limit fps to 30:
 ## rain/snow:
### Network
 ## nice terrasync -p 5505 -S -d /opt/fgfs/scenery.terrasync :
 ## fgcom -Sfgcom.flightgear.org.uk [-f910] :
### System
 ## alert,warn,info,debug
 ## disable mouse mode 'fly':

Some specific properties

Some options (mostly properties) are only of temporary interest to most users or even users running a development version of FlightGear:

  • --prop:/sim/traffic-manager/use-custom-scenery-data=true[1]

Note  With Git version (and probably 2.4.0 as well) the below option can only be used together with the --disable-real-weather-fetch option!
  • --random-wind # Not in 1.9.1 and former versions

Nice turbulences during approaches. ;-)

Using fgfsrc for debugging

For debugging purposes, like when using gdb, it might be easier for you to arrange a .fgfsrc with minimal options enabled. See troubleshooting crashes for further info. A template for a debug .fgfsrc file could for example be:

Note  You will have to direct --fg-root towards your $FGDATA folder.

Please feel free to add other useful options to the temporary and basic ones!!!

Foot notes and references

  1. See forum This is a link to the FlightGear forum. and mailing list for more info on this.

Related content

Wiki articles

Development mailing list threads