Start up and Configuration
This page summarizes the most important configuration features of FreeCAD.
Here the most common ways to start FreeCAD.
Command line parameter
The command line options are subject of frequent changes right now. There fore its a good Idea to check the actual possible options by typing:
From the response you can read the possible parameters:
Usage: FreeCAD [options] File1 File2 ..... Allowed options:
Generic options: -v [ --version ] print version string -h [ --help ] print help message -c [ --console ] start in console mode
Configuration: -l [ --write-log ] arg write a log file -t [ --run-test ] arg test level -M [ --module-path ] arg additional module paths -P [ --python-path ] arg additional python paths --response-file arg can be specified with '@name', too
Response and config files
FreeCAD can read some of the options from a config file. The file has to be in the bin path and have to be named FreeCAD.cfg. Options specified in the command line override the config file!
Some operating system have very low limits of the command line length. The common way to work around those limitations is using response files. A response file is just a configuration file which uses the same syntax as the command line. If the command line specifies a name of response file to use, it's loaded and parsed in addition to the command line:
There are a couple of options not visible to the user. This options are e.g. the X-Window parameters parsed by the Windows system:
- -display display, sets the X display (default is $DISPLAY).
- -geometry geometry, sets the client geometry of the first window that is shown.
- -fn or -font font, defines the application font. The font should be specified using an X logical font description.
- -bg or -background color, sets the default background color and an application palette (light and dark shades are calculated).
- -fg or -foreground color, sets the default foreground color.
- -btn or -button color, sets the default button color.
- -name name, sets the application name.
- -title title, sets the application title.
- -visual TrueColor, forces the application to use a TrueColor visual on an 8-bit display.
- -ncols count, limits the number of colors allocated in the color cube on an 8-bit display, if the application is using the QApplication::ManyColor color specification. If count is 216 then a 6x6x6 color cube is used (i.e. 6 levels of red, 6 of green, and 6 of blue); for other values, a cube approximately proportional to a 2x3x1 cube is used.
- -cmap, causes the application to install a private color map on an 8-bit display.
The Config set
On every Startup FreeCAD examines its surrounding and the command line parameters. It builds up a configuration set which holds the essence of the runtime information. This information is later used to determine the place where to save user data or log files. It is also very important for post postmortem analyzes. Therefore it is saved in the log file.
|Config var name||Synopsis||Example M$||Example Posix (Linux)|
|UserAppData||Path where FreeCAD stores User Related application data.||C:\Documents and Settings\username\Application Data\FreeCAD||/home/username/.FreeCAD|
|UserParameter||File where FreeCAD stores User Related application data.||C:\Documents and Settings\username\Application Data\FreeCAD\user.cfg||/home/username/.FreeCAD/user.cfg|
|SystemParameter||File where FreeCAD stores Application Related data.||C:\Documents and Settings\username\Application Data\FreeCAD\system.cfg||/home/username/.FreeCAD/system.cfg|
|UserHomePath||Home path of the current user||C:\Documents and Settings\username\My Documents||/home/username|
Command line argument triggered
|Config var name||Synopsis||Example|
|LoggingFile||1 if the logging is switched on||1|
|LoggingFileName||File name where the log is placed||C:\Documents and Settings\username\Application Data\FreeCAD\FreeCAD.log|
|RunMode||This indicates how the main loop will work. "Script" means that the given script is called and then exit. "Cmd" runs the command line interpreter. "Internal" runs an internal script. "Gui" enters the Gui event loop. "Module" loads a given python module.||"Cmd"|
|FileName||Meaning depends on the RunMode|
|ScriptFileName||Meaning depends on the RunMode|
|Verbose||Verbosity level of FreeCAD||"" or "strict"|
|OpenFileCount||Holds the number of files opened through command line arguments||"12"|
|AdditionalModulePaths||Holds the additional Module paths given in the cmd line||"extraModules/"
Some libraries trigger on system environment variables. If a FreeCAD installation has a problem, sometimes environment variables are responsible for it. Therefore some important variables get duplicated in the Config and saved in the log file.
Python related environment variables:
OpenCascade related environment variables:
System related environment variables:
Info about the Build
The table below shows the availible informations about the Build version. Most of it comes out of the Subversion repository. This stuff is needed to exactly rebuild a version!
These Config entries are related to the branding mechanism of FreeCAD. See Branding for more details.