Environment variables

From FlightGear wiki
Jump to navigation Jump to search
This article is a stub. You can help the wiki by expanding it.

Environment variables This is a link to a Wikipedia article are a way of defining settings that can be used by applications like FlightGear. Environment variables are set by using the operating system interfaces.

Note: Most (all?) settings used by FlightGear can be set without using environment variables - for example configuring settings from the Qt launcher, the GUI inside the simulator, or the command-line. However, parts of FlightGear like 3rd party opensource libraries such as OSG, or parts like SimGear, may have advanced or experimental settings that can only be set using environment variables - these types of settings are only useful for power users and developers.

Setting environment variables from your Operating System

Linux

Windows

Windows 10 dialog boxes for creating a new 'User environment variable', and setting the name and value of that environment variable
Windows 10 dialog boxes for creating a new 'User environment variable', and setting the name and value of that environment variable. The environment variable that is being defined is $FG ROOT, a directory where FlightGear data of the base package is stored. The value in this case is the path to the directory. Note that most (all?) FlightGear environment variables can be set without using the operating system interfaces. Click to enlarge.

Windows allows you to set environment variables from a graphical user interface (GUI) dialog box or the command-prompt.

GUI

Windows allows you to set user or system environment variables. User environment variables (docs - archive Feb 2020) are only visible to programs run by the current user, you should probably just define the environment variables for FlightGear settings here.

Open the Advanced System settings dialog box:

  • Right click on My Computer on the desktop > click Properties > click Advanced System Settings link
  • Control Panel > System > click Advanced System Settings link

Add a new environment variable for a FlightGear setting, and assign a value to it

  • Click environment variables > User variables for [your account name here] > click New
  • Enter the name of the Environment variable, Enter the value of the environment variable

Command-prompt

Open command-prompt. Type setand press Enter to show all defined environment variables. Type set [variable_name for the setting]=[value to set]to define an environment variable and set it to a value.

MacOS

Environment variable settings