Start up and Configuration/en

This page shows the different ways to start FreeCAD and the most important configuration features.

Starting FreeCAD from the Command line
FreeCAD can be started normally by double-clicking on its desktop icon or selecting it from the start menu, but it can also be started directly from the command line. This allows you to change some of the default startup options.

Command line options
The command line options are subject to frequent changes.Ttherefore, it is a good idea to check the current options by typing: FreeCAD --help 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 --response-file arg  can be specified with '@name', too

Configuration: -l [ --write-log ] arg   write a log file to default location(Run FreeCAD --h to see default location) --log-file arg           Unlike to --write-log this allows to log to an arbitrary file -u [ --user-cfg] arg     User config file to load/save user settings -s [ --system-cfg] arg   System config file to load/save system settings -t [ --run-test ] arg    test level -M [ --module-path ] arg additional module paths -P [ --python-path ] arg additional python paths

EX: (Windows)

Response and config files
FreeCAD can read some of these options from a config file. This file must be in the bin path and must be named FreeCAD.cfg. Be aware that options specified in the command line override the config file!

Some operating systems have a very low limit of characters on the command line. 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 response file, it's loaded and parsed in addition to the command line:

or:

Hidden options
There are a couple of options not visible to the user. These options are e.g. the X-Window parameters parsed by the Windows system:
 * -display - Sets the X display (default is $DISPLAY).
 * -geometry - Sets the client geometry of the first window that is shown.
 * -fn or -font - Defines the application font. The font should be specified using an X logical font description.
 * -bg or -background - Sets the default background color and an application palette (light and dark shades are calculated).
 * -fg or -foreground - Sets the default foreground color.
 * -btn or -button - Sets the default button color.
 * -name - Sets the application name.
 * -title - Sets the application title.
 * -visual - Forces the application to use a TrueColor visual on an 8-bit display.
 * -ncols - 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.

Running FreeCAD without Graphical User Interface
FreeCAD is usually built with two executables: a GUI capable one called FreeCAD, and a command line only FreeCADCmd. FreeCAD can be used in console mode using the "-c" switch, this is the default behaviour of FreeCADCmd: FreeCAD -c from the command line. In console mode, no user interface will be displayed, and you will be presented with a python interpreter prompt. From that python prompt, you have the same functionality as the python interpreter that runs inside the FreeCAD GUI, and normal access to all modules and plugins of FreeCAD, excepted the FreeCADGui module. Be aware that modules that depend on FreeCADGui might also be unavailable.

Python scripts/FreeCAD macro files can be specified as command line arguments to either of the executables mentioned above.

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.

System related
Some libraries need to call system environment variables. Sometimes when there is a problem with a FreeCAD installation, it is because some environment variable is absent or set wrongly. 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:
 * PYTHONPATH
 * PYTHONHOME
 * TCL_LIBRARY
 * TCLLIBPATH
 * CSF_MDTVFontDirectory
 * CSF_MDTVTexturesDirectory
 * CSF_UnitsDefinition
 * CSF_UnitsLexicon
 * CSF_StandardDefaults
 * CSF_PluginDefaults
 * CSF_LANGUAGE
 * CSF_SHMessage
 * CSF_XCAFDefaults
 * CSF_GraphicShr
 * CSF_IGESDefaults
 * CSF_STEPDefaults
 * PATH

Build related information
The table below shows the available information about the Build version. Most of it comes from the Subversion repository. This stuff is needed to exactly rebuild a version!

Branding related
These Config entries are related to the branding mechanism of FreeCAD. See Branding for more details.