Fgfsrc: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
(page created, far from finished)
 
(+ Template:Lowercase title)
 
(27 intermediate revisions by 9 users not shown)
Line 1: Line 1:
{{stub}}
{{lowercase title}}


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.


== 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:


Lines starting with # are comments. Lines containing an option followed by a comment are *not* allowed!
* 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? -->
* 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>.


A basic example:
=== 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
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 <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
#
 
#
 
  ### Aircraft
  ### Aircraft
  #
  #
  --aircraft=ec135
  --aircraft=ec135
   ## a24, Albatross, Catalina, dhc2F, dhc3[A/F], dhc6F
   ## Catalina, dhc3[A/F], p47d-30, F1-156-de, ZivkoEdge540  
  ## p47d-30, F1-156-de, ZivkoEdge540
  ## alouette2[/F], Alouette-III, apache, ch47, ch53e, dauphin, HUP, ka50, Lynx,
  ## R22, S-51, s76c, s58, superfrelon, tigre, uh1, uh60, v22
   ## MPcarrier: nimitz, nimitz-ATC, nimitz_observer, foch, vinson, eisenhower
   ## MPcarrier: nimitz, nimitz-ATC, nimitz_observer, foch, vinson, eisenhower
#--prop:/sim/remote/pilot-callsign=U-FLY
 
#
 
#
  ### Initial position
  ### Initial position
  #
  #
Line 27: Line 44:
  #--parkpos=A11
  #--parkpos=A11
  #
  #
# In air:
  #--offset-distance=1.5
  #--offset-distance=1.5
  #--altitude=6000
  #--altitude=6000
Line 32: Line 50:
  #--enable-freeze
  #--enable-freeze
  #
  #
  #
  # Coordinates:
  ## Oilrig Lennox:
#--lon=-3.17547
#--lat=53.63305
#--altitude=205
 
 
  ### Environment
  ### Environment
  #
  #
  --timeofday=noon
  --timeofday=noon
  --random-wind
  #--enable-real-weather-fetch
--enable-real-weather-fetch
  ##rain/snow:
--prop:/sim/rendering/precipitation-enable=false
  --enable-horizon-effect
  --enable-horizon-effect
  --enable-specular-highlight
  --enable-specular-highlight
Line 48: Line 69:
  --enable-random-objects
  --enable-random-objects
  --prop:/sim/rendering/random-vegetation=true
  --prop:/sim/rendering/random-vegetation=true
  ## limit fps to 30:
  --prop:/sim/frame-rate-throttle-hz=30
  --prop:/sim/frame-rate-throttle-hz=30
  ## rain/snow:
--prop:/sim/rendering/precipitation-enable=true
  --ai-scenario=nimitz_demo
  --ai-scenario=nimitz_demo
  #
  --ai-scenario=clemenceau_demo
  #
  #--ai-scenario=aircraft_demo
 
  ### Network
  ### Network
  #
  #
  --callsign=I-FLY
  --callsign=I-FLY
  --multiplay=out,10,mpserver01.flightgear.org,5000
#--prop:/sim/remote/pilot-callsign=U-FLY
  --multiplay=out,10,mpserverXX.flightgear.org,5000
  #--multiplay=in,10,localhost,5000
  #--multiplay=in,10,localhost,5000
  --httpd=5500
  --httpd=5500
Line 62: Line 88:
   ## fgcom -Sfgcom.flightgear.org.uk [-f910] :
   ## fgcom -Sfgcom.flightgear.org.uk [-f910] :
  --generic=socket,out,10,localhost,16661,udp,fgcom
  --generic=socket,out,10,localhost,16661,udp,fgcom
#
 
#
 
  ### System
  ### System
  #
  #
  #--log-level=info
  #--log-level=info
   ## alarm,warn,info,debug
   ## alert,warn,info,debug
  --fg-root=/opt/fgfs/data
  --fg-root=/opt/fgfs/data
  --fg-scenery=/opt/fgfs/data/Scenery:/opt/fgfs/scenery.1.0.1:/opt/fgfs/scenery.terrasync
  --fg-scenery=/opt/fgfs/data/Scenery:/opt/fgfs/scenery.1.0.1:/opt/fgfs/scenery.terrasync
Line 76: Line 102:
   ## disable mouse mode 'fly':
   ## disable mouse mode 'fly':
  --prop:/input/mice/mouse/mode/button[2]/binding/value=2
  --prop:/input/mice/mouse/mode/button[2]/binding/value=2
  ## parkpos, temporary:
--prop:/sim/traffic-manager/use-custom-scenery-data=true


Please feel free to add other usefull options!!!
=== 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">
--fg-root=
--ignore-autosave
--airport=ksfo
--offset-distance=4000
--offset-azimuth=90
--altitude=500
--heading=0
--model-hz=60
--disable-random-objects
--prop:/sim/rendering/texture-compression=off
--prop:/sim/rendering/quality-level=0
--prop:/sim/rendering/shaders/quality-level=0
--disable-ai-traffic
--prop:/sim/ai/enabled=0
--aircraft=ufo
--disable-sound
--prop:/sim/rendering/random-vegetation=0
--prop:/sim/rendering/random-buildings=0
--disable-specular-highlight
--disable-ai-models
--timeofday=noon
--disable-clouds
--disable-clouds3d
--fog-fastest
--visibility=5000
--disable-distance-attenuation
--disable-enhanced-lighting
--disable-real-weather-fetch
--prop:/sim/rendering/particles=0
--prop:/sim/rendering/multi-sample-buffers=0
--prop:/sim/rendering/multi-samples=1
--prop:/sim/sceneryloaded-override=1
--prop:/sim/rendering/draw-mask/aircraft=0
--prop:/sim/rendering/draw-mask/models=0
--prop:/sim/rendering/draw-mask/clouds=0
--prop:/sim/rendering/draw-mask/terrain=0
</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?l=flightgear-devel%40flightgear.org&q=fgfsrc&submit.x=0&submit.y=0
 
[[Category:FlightGear]]
 
[[fr:Fgfsrc]]

Latest revision as of 06:22, 8 September 2020


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
#
--aircraft=ec135
 ## Catalina, dhc3[A/F], p47d-30, F1-156-de, ZivkoEdge540 
 ## MPcarrier: nimitz, nimitz-ATC, nimitz_observer, foch, vinson, eisenhower
 
 
### Initial position
#
--airport=LOWI
#--runway=08L
#--parkpos=A11
#
# In air:
#--offset-distance=1.5
#--altitude=6000
#--vc=70
#--enable-freeze
#
# Coordinates:
 ## Oilrig Lennox:
#--lon=-3.17547
#--lat=53.63305
#--altitude=205
 
 
### Environment
#
--timeofday=noon
#--enable-real-weather-fetch
--enable-horizon-effect
--enable-specular-highlight
--enable-ai-models
--enable-clouds3d
--shading-flat
--fog-nicest
--enable-random-objects
--prop:/sim/rendering/random-vegetation=true
 ## limit fps to 30:
--prop:/sim/frame-rate-throttle-hz=30
 ## rain/snow:
--prop:/sim/rendering/precipitation-enable=true
--ai-scenario=nimitz_demo
--ai-scenario=clemenceau_demo
#--ai-scenario=aircraft_demo
 
### Network
#
--callsign=I-FLY
#--prop:/sim/remote/pilot-callsign=U-FLY
--multiplay=out,10,mpserverXX.flightgear.org,5000
#--multiplay=in,10,localhost,5000
--httpd=5500
 ## nice terrasync -p 5505 -S -d /opt/fgfs/scenery.terrasync :
--atlas=socket,out,1,localhost,5505,udp 
 ## fgcom -Sfgcom.flightgear.org.uk [-f910] :
--generic=socket,out,10,localhost,16661,udp,fgcom
 
 
### System
#
#--log-level=info
 ## alert,warn,info,debug
--fg-root=/opt/fgfs/data
--fg-scenery=/opt/fgfs/data/Scenery:/opt/fgfs/scenery.1.0.1:/opt/fgfs/scenery.terrasync
--geometry=1280x1024
--bpp=24
--control=joystick
--prop:/sim/traffic-manager/enabled=0
 ## disable mouse mode 'fly':
--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:

  • --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.
--fg-root=
--ignore-autosave
--airport=ksfo
--offset-distance=4000
--offset-azimuth=90
--altitude=500
--heading=0
--model-hz=60
--disable-random-objects
--prop:/sim/rendering/texture-compression=off
--prop:/sim/rendering/quality-level=0
--prop:/sim/rendering/shaders/quality-level=0
--disable-ai-traffic
--prop:/sim/ai/enabled=0
--aircraft=ufo
--disable-sound
--prop:/sim/rendering/random-vegetation=0
--prop:/sim/rendering/random-buildings=0
--disable-specular-highlight
--disable-ai-models
--timeofday=noon
--disable-clouds
--disable-clouds3d
--fog-fastest
--visibility=5000
--disable-distance-attenuation
--disable-enhanced-lighting
--disable-real-weather-fetch
--prop:/sim/rendering/particles=0
--prop:/sim/rendering/multi-sample-buffers=0
--prop:/sim/rendering/multi-samples=1
--prop:/sim/sceneryloaded-override=1
--prop:/sim/rendering/draw-mask/aircraft=0
--prop:/sim/rendering/draw-mask/models=0
--prop:/sim/rendering/draw-mask/clouds=0
--prop:/sim/rendering/draw-mask/terrain=0

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