Difference between revisions of "Start up and Configuration"

From FreeCAD Documentation
Jump to: navigation, search
(Marked this version for translation)
 
(33 intermediate revisions by 8 users not shown)
Line 1: Line 1:
 +
<languages/>
 
<translate>
 
<translate>
 +
<!--T:41-->
 +
{{docnav|Third Party Tools|FreeCAD Build Tool}}
 +
 
<!--T:1-->
 
<!--T:1-->
 
This page shows the different ways to start FreeCAD and the most important configuration features.  
 
This page shows the different ways to start FreeCAD and the most important configuration features.  
Line 6: Line 10:
  
 
<!--T:3-->
 
<!--T:3-->
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 soem of the default startup options.
+
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.
 +
 
 +
=== Using command line options without a command line shell === <!--T:40-->
 +
* On Ubuntu you can create a desktop icon and edit its properties. Add the command line options separated by spaces behind the program name in the "Command" field.
 +
* On Windows create a shortcut and edit the properties. Add the command line options separated by spaces to "Target" field.
  
 
=== Command line options === <!--T:4-->
 
=== Command line options === <!--T:4-->
  
 
<!--T:5-->
 
<!--T:5-->
The command line options are subject of frequent changes, therefore it is a good idea to check the current options by typing:
+
The command line options are subject to frequent changes.Therefore, it is a good idea to check the current options by typing:
 
</translate>
 
</translate>
 
  FreeCAD --help
 
  FreeCAD --help
Line 18: Line 26:
 
From the response you can read the possible parameters:
 
From the response you can read the possible parameters:
 
</translate>
 
</translate>
Usage:
+
  Usage: FreeCAD [options] File1 File2 ...
FreeCAD [options] File1 File2 .....
+
 
Allowed options:
+
  Allowed options:
+
 
Generic options:
+
  Generic options:
  -v [ --version ]     print version string
+
    -v [ --version ]         Prints version string
  -h [ --help ]         print help message
+
    -h [ --help ]             Prints help message
  -c [ --console ]     start in console mode
+
    -c [ --console ]         Starts in console mode
  --response-file arg   can be specified with '@name', too
+
    --response-file arg       Can be specified with '@name', too
 
+
    --dump-config            Dumps configuration
Configuration:
+
    --get-config arg          Prints the value of the requested configuration key
  -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
+
  Configuration:
  -u [ --user-cfg] arg     User config file to load/save user settings
+
    -l [ --write-log ]       Writes a log file to:
  -s [ --system-cfg] arg   System config file to load/save system settings
+
                              /home/beast/.FreeCAD/FreeCAD.log
  -t [ --run-test ] arg    test level
+
    --log-file arg            Unlike --write-log this allows logging to an  
  -M [ --module-path ] arg  additional module paths
+
                              arbitrary file
  -P [ --python-path ] arg  additional python paths  
+
    -u [ --user-cfg ] arg     User config file to load/save user settings
 
+
    -s [ --system-cfg ] arg   System config file to load/save system settings
EX: (Windows)
+
    -t [ --run-test ] arg    Test case - or 0 for all
{{Code|code=
+
    -M [ --module-path ] arg  Additional module paths
"C:\Program Files\FreeCAD 0.14\bin\FreeCAD.exe" -M "N:\FreeCAD\Mod\Draft" -M "N:\FreeCAD\Mod\Part" -M "N:\FreeCAD\Mod\Drawing" -u "N:\FreeCAD\Config\user.cfg" -s "N:\FreeCAD\Config\system.cfg"
+
    -P [ --python-path ] arg  Additional python paths
}}
+
    --single-instance        Allow to run a single instance of the application
 
 
 
<translate>
 
<translate>
  
Line 47: Line 54:
  
 
<!--T:8-->
 
<!--T:8-->
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!
+
FreeCAD can read some of these options from a config file. This file must be in the bin path and must be named {{FileName|FreeCAD.cfg}}. Be aware that options specified in the command line override the config file!
  
 
<!--T:9-->
 
<!--T:9-->
Some operating system have very low limit 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:
+
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:
 +
 
 
</translate>
 
</translate>
FreeCAD @ResponseFile.txt  
+
{{Code|code=
 +
FreeCAD @ResponseFile.txt  
 +
}}
 
<translate>
 
<translate>
 +
 
<!--T:10-->
 
<!--T:10-->
 
or:
 
or:
 +
 
</translate>  
 
</translate>  
FreeCAD --response-file=ResponseFile.txt
+
{{Code|code=
 +
FreeCAD --response-file=ResponseFile.txt
 +
}}
 
<translate>
 
<translate>
 +
 
=== Hidden options === <!--T:11-->
 
=== Hidden options === <!--T:11-->
  
 
<!--T:12-->
 
<!--T:12-->
 
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:
 
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 display, sets the X display (default is $DISPLAY).
+
* ''-display'' - Sets the X display (default is $DISPLAY).
* -geometry geometry, sets the client geometry of the first window that is shown.
+
* ''-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.
+
* ''-fn'' or ''-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).
+
* ''-bg'' or ''-background'' - Sets the default background color and an application palette (light and dark shades are calculated).
* -fg or -foreground color, sets the default foreground color.
+
* ''-fg'' or ''-foreground'' - Sets the default foreground color.
* -btn or -button color, sets the default button color.
+
* ''-btn'' or ''-button'' - Sets the default button color.
* -name name, sets the application name.
+
* ''-name''  - Sets the application name.
* -title title, sets the application title.
+
* ''-title'' - Sets the application title.
* -visual TrueColor, forces the application to use a TrueColor visual on an 8-bit display.
+
* ''-visual'' -  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.
+
* ''-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.
+
* ''-cmap'' - Causes the application to install a private color map on an 8-bit display.
  
== Running FreeCAD without User Interface == <!--T:13-->
+
== Running FreeCAD without Graphical User Interface == <!--T:13-->
  
 
<!--T:14-->
 
<!--T:14-->
FreeCAD normally starts in GUI mode, but you can also force it to start in console mode by typing:
+
FreeCAD is usually built with two executables: a GUI capable one called {{FileName|FreeCAD}}, and a command line only {{FileName|FreeCADCmd}}.
 +
FreeCAD can be used in console mode using the "-c" switch, this is the default behaviour of {{FileName|FreeCADCmd}}:
 
</translate>
 
</translate>
 
  FreeCAD -c
 
  FreeCAD -c
Line 85: Line 101:
 
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.
 
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.
  
 
+
<!--T:39-->
== Running FreeCAD as a python module == <!--T:16-->
+
Python scripts/FreeCAD macro files can be specified as command line arguments to either of the executables mentioned above.
 
 
<!--T:17-->
 
FreeCAD can also be used to run as a python module inside other applications that use python or from an external python shell. For that, the host python application must know where your FreeCAD libs reside. The best way to obtain that is to temporarily append FreeCAD's lib path to the sys.path variable. The following code typed from any python shell will import FreeCAD and let you run it the same way as in console mode:
 
 
 
</translate>
 
<syntaxhighlight>
 
import sys
 
sys.path.append("path/to/FreeCAD/lib") # change this by your own FreeCAD lib path
 
import FreeCAD
 
</syntaxhighlight>
 
<translate>
 
 
 
<!--T:18-->
 
Once FreeCAD is loaded, it is up to you to make it interact with your host application in any way you can imagine!
 
  
 
== The Config set == <!--T:19-->
 
== The Config set == <!--T:19-->
Line 113: Line 115:
 
|+ User config entries
 
|+ User config entries
 
|-
 
|-
! Config var name      !! Synopsis                        !! Example M$                !! Example Posix (Linux)  
+
! 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    
+
| UserAppData          || Path where FreeCAD stores User Related application data. || {{FileName|C:\Documents and Settings\username\AppData\FreeCAD}} || {{FileName|/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       
+
| UserParameter        || File where FreeCAD stores User Related application data. || {{FileName|C:\Documents and Settings\username\AppData\FreeCAD\user.cfg}} || {{FileName|/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    
+
| SystemParameter      || File where FreeCAD stores Application Related data. || {{FileName|C:\Documents and Settings\username\AppData\FreeCAD\system.cfg}} || {{FileName|/home/username/.FreeCAD/system.cfg}}
 
|-               
 
|-               
| UserHomePath        || Home path of the current user  || C:\Documents and Settings\username\My Documents ||/home/username    
+
| UserHomePath        || Home path of the current user  || {{FileName|C:\Documents and Settings\username\My Documents}} || {{FileName|/home/username}}
 
|}
 
|}
  
Line 131: Line 133:
 
|-
 
|-
 
! Config var name      !! Synopsis                        !! Example                 
 
! Config var name      !! Synopsis                        !! Example                 
|-              
+
|-
| LoggingFile          || 1 if the logging is switched on || 1    
+
| 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    
+
| LoggingFileName      || File name where the log is placed || {{FileName|C:\Documents and Settings\username\AppData\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"
 
| 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 ||
 
|-               
 
|-               
| FileName            || Meaning depends on the RunMode ||     
+
| ScriptFileName      || Meaning depends on the RunMode ||  
|-             
+
|-
| ScriptFileName      || Meaning depends on the RunMode ||      
+
| Verbose              || Verbosity level of FreeCAD      || "" or "strict"
|-              
+
|-
| Verbose              || Verbosity level of FreeCAD      || "" or "strict"  
+
| OpenFileCount        ||Holds the number of files opened through command line arguments  || "12"
|-              
+
|-
| OpenFileCount        ||Holds the number of files opened through command line arguments  || "12"  
+
| AdditionalModulePaths||Holds the additional Module paths given in the cmd line  || "extraModules/"
|-          
 
| AdditionalModulePaths||Holds the additional Module paths given in the cmd line  || "extraModules/"  
 
 
|}
 
|}
  
Line 155: Line 157:
 
|+ User config entries
 
|+ User config entries
 
|-
 
|-
! Config var name      !! Synopsis                        !! Example M$                !! Example Posix (Linux)  
+
! Config var name      !! Synopsis                        !! Example M$                !! Example Posix (Linux)
 +
|-
 +
| AppHomePath          || Path where FreeCAD is installed || {{FileName|c:/Progam Files/FreeCAD_0.7}} || {{FileName|/user/local/FreeCAD_0.7}}
 +
|-
 +
| PythonSearchPath    || Holds a list of paths which python search modules. This is at startup can change during execution  ||  ||
 +
|}
 +
 
 +
=== Example execute a file === <!--T:49-->
 +
 
 +
<!--T:50-->
 +
{| border="2" cellpadding="4" cellspacing="0" style="margin-top:1em; margin-bottom:1em; background:#f9f9f9; border:1px #aaa solid; border-collapse:collapse;"
 +
|+ Command line configuration for execute a file
 +
!  Execute a file    !! System !! Command line configuration
 +
|-
 +
| Module, cfg||Windows || {{FileName|"C:\Program Files\FreeCAD\bin\FreeCAD.exe" -M "C:\FreeCAD\Mod\Draft" -u "C:\FreeCAD\Config\user.cfg" -s "C:\FreeCAD\Config\system.cfg"}}
 
|-               
 
|-               
| AppHomePath          || Path where FreeCAD is installed || c:/Progam Files/FreeCAD_0.7|| /user/local/FreeCAD_0.7
+
|           ||Linux  || {{FileName|todo}}
|-              
+
|-
| PythonSearchPath    || Holds a list of paths which python search modules. This is at startup can change during execution  || ||    
+
|-
 +
| .FCMacro or .py  ||Windows || {{FileName|"C:\Program Files\FreeCAD\bin\FreeCAD.exe" "C:\Users\userName\AppData\Roaming\FreeCAD\Mod\WorkFeature\start_WF.FCMacro"}}
 +
|-
 +
|                 ||Linux  || {{FileName|todo}}
 
|}
 
|}
 +
  
 
<!--T:27-->
 
<!--T:27-->
Line 167: Line 187:
 
<!--T:28-->
 
<!--T:28-->
 
'''Python related environment variables:'''
 
'''Python related environment variables:'''
 +
 
</translate>
 
</translate>
 
* PYTHONPATH
 
* PYTHONPATH
Line 173: Line 194:
 
* TCLLIBPATH
 
* TCLLIBPATH
 
<translate>
 
<translate>
 +
 
<!--T:29-->
 
<!--T:29-->
 
'''OpenCascade related environment variables:'''
 
'''OpenCascade related environment variables:'''
 +
 
</translate>
 
</translate>
 
* CSF_MDTVFontDirectory
 
* CSF_MDTVFontDirectory
Line 189: Line 212:
 
* CSF_STEPDefaults
 
* CSF_STEPDefaults
 
<translate>
 
<translate>
 +
 
<!--T:30-->
 
<!--T:30-->
 
'''System related environment variables:'''
 
'''System related environment variables:'''
Line 194: Line 218:
 
* PATH
 
* PATH
 
<translate>
 
<translate>
 +
 
=== Build related information=== <!--T:31-->
 
=== Build related information=== <!--T:31-->
  
 
<!--T:32-->
 
<!--T:32-->
The table below shows the availible informations about the Build version. Most of it comes from the Subversion repository. This stuff is needed to exactly rebuild a version!
+
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!
  
 
<!--T:33-->
 
<!--T:33-->
Line 205: Line 230:
 
! Config var name      !! Synopsis                        !! Example                   
 
! Config var name      !! Synopsis                        !! Example                   
 
|-               
 
|-               
| BuildVersionMajor    || Major Version number of the Build. Defined in src/Build/Version.h.in  || 0
+
| BuildVersionMajor    || Major Version number of the Build. Defined in {{FileName|src/Build/Version.h.in}}   || 0
 
|-               
 
|-               
| BuildVersionMinor    || Minor Version number of the Build. Defined in src/Build/Version.h.in  || 7
+
| BuildVersionMinor    || Minor Version number of the Build. Defined in {{FileName|src/Build/Version.h.in}}   || 7
 
|-               
 
|-               
 
| BuildRevision        || SVN Repository Revision number of the src in the Build. Generated by SVN    || 356         
 
| BuildRevision        || SVN Repository Revision number of the src in the Build. Generated by SVN    || 356         
 
|-               
 
|-               
| BuildRevisionRange  || Range of differnt changes    ||  123-356  
+
| BuildRevisionRange  || Range of different changes    ||  123-356  
 
|-               
 
|-               
 
| BuildRepositoryURL  || Repository URL    || https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk/src
 
| BuildRepositoryURL  || Repository URL    || https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk/src
Line 217: Line 242:
 
| BuildRevisionDate    || Date of the above Revision    || 2007/02/03 22:21:18     
 
| BuildRevisionDate    || Date of the above Revision    || 2007/02/03 22:21:18     
 
|-               
 
|-               
| BuildScrClean        || Indicates if the source was changed ager checkout  ||Src modified             
+
| BuildScrClean        || Indicates if the source was changed after checkout  ||Src modified             
 
|-               
 
|-               
 
| BuildScrMixed        ||      || Src not mixed
 
| BuildScrMixed        ||      || Src not mixed
 
|}
 
|}
  
 
 
=== Branding related === <!--T:34-->
 
=== Branding related === <!--T:34-->
  
Line 234: Line 258:
 
! Config var name      !! Synopsis                        !! Example   
 
! Config var name      !! Synopsis                        !! Example   
 
|-               
 
|-               
| ExeName              || Name of the build Executable file. Can diver from FreeCAD if a different main.cpp is used.    || FreeCAD.exe  
+
| ExeName              || Name of the build Executable file. Can differ from FreeCAD if a different {{FileName|main.cpp}} is used.    || {{FileName|FreeCAD.exe}}
 
|-               
 
|-               
 
| ExeVersion          || Over all Version shows up at start time  || V0.7  
 
| ExeVersion          || Over all Version shows up at start time  || V0.7  
Line 244: Line 268:
 
| SplashPicture        || Name of the Icon used for the Splash Screen    || "FreeCADSplasher"         
 
| SplashPicture        || Name of the Icon used for the Splash Screen    || "FreeCADSplasher"         
 
|-               
 
|-               
| SplashAlignment      || Alignment of the Text in the Splash dialog    || "Bottom|Left"     
+
| SplashAlignment      || Alignment of the Text in the Splash dialog    || "Bottom" or "Left"     
 
|-               
 
|-               
 
| SplashTextColor      || Color of the splasher Text    || "#000000"         
 
| SplashTextColor      || Color of the splasher Text    || "#000000"         
 
|-               
 
|-               
| StartWorkbench      || Name of the Workbech which get started automaticly after Startup    || "Part design"   
+
| StartWorkbench      || Name of the Workbench which get started automatically after Startup    || "Part design"   
 
|-               
 
|-               
 
| HiddenDockWindow    || List of dockwindows (separated by a semicolon) which will be disabled || "Property editor"     
 
| HiddenDockWindow    || List of dockwindows (separated by a semicolon) which will be disabled || "Property editor"     
 
|}
 
|}
 +
 +
=== Related Pages === <!--T:51-->
 +
 +
<!--T:52-->
 +
* [[Std CommandLine]]
  
 
<!--T:37-->
 
<!--T:37-->
 
{{docnav|Third Party Tools|FreeCAD Build Tool}}
 
{{docnav|Third Party Tools|FreeCAD Build Tool}}
 +
 +
<!--T:42-->
 +
{{Userdocnavi}}
  
 
<!--T:38-->
 
<!--T:38-->
Line 261: Line 293:
 
</translate>
 
</translate>
 
{{clear}}
 
{{clear}}
<languages/>
 

Latest revision as of 21:48, 20 September 2019

Other languages:
čeština • ‎Deutsch • ‎English • ‎español • ‎français • ‎italiano • ‎polski • ‎română • ‎русский • ‎svenska • ‎Türkçe

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.

Using command line options without a command line shell

  • On Ubuntu you can create a desktop icon and edit its properties. Add the command line options separated by spaces behind the program name in the "Command" field.
  • On Windows create a shortcut and edit the properties. Add the command line options separated by spaces to "Target" field.

Command line options

The command line options are subject to frequent changes.Therefore, 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 ]          Prints version string
   -h [ --help ]             Prints help message
   -c [ --console ]          Starts in console mode
   --response-file arg       Can be specified with '@name', too
   --dump-config             Dumps configuration
   --get-config arg          Prints the value of the requested configuration key
 
 Configuration:
   -l [ --write-log ]        Writes a log file to:
                             /home/beast/.FreeCAD/FreeCAD.log
   --log-file arg            Unlike --write-log this allows logging 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 case - or 0 for all
   -M [ --module-path ] arg  Additional module paths
   -P [ --python-path ] arg  Additional python paths
   --single-instance         Allow to run a single instance of the application

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:

FreeCAD @ResponseFile.txt

or:

FreeCAD --response-file=ResponseFile.txt

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.

User related information

User config entries
Config var name Synopsis Example M$ Example Posix (Linux)
UserAppData Path where FreeCAD stores User Related application data. C:\Documents and Settings\username\AppData\FreeCAD /home/username/.FreeCAD
UserParameter File where FreeCAD stores User Related application data. C:\Documents and Settings\username\AppData\FreeCAD\user.cfg /home/username/.FreeCAD/user.cfg
SystemParameter File where FreeCAD stores Application Related data. C:\Documents and Settings\username\AppData\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 arguments

User config entries
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\AppData\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/"

System related

User config entries
Config var name Synopsis Example M$ Example Posix (Linux)
AppHomePath Path where FreeCAD is installed c:/Progam Files/FreeCAD_0.7 /user/local/FreeCAD_0.7
PythonSearchPath Holds a list of paths which python search modules. This is at startup can change during execution

Example execute a file

Command line configuration for execute a file
Execute a file System Command line configuration
Module, cfg Windows "C:\Program Files\FreeCAD\bin\FreeCAD.exe" -M "C:\FreeCAD\Mod\Draft" -u "C:\FreeCAD\Config\user.cfg" -s "C:\FreeCAD\Config\system.cfg"
Linux todo
.FCMacro or .py Windows "C:\Program Files\FreeCAD\bin\FreeCAD.exe" "C:\Users\userName\AppData\Roaming\FreeCAD\Mod\WorkFeature\start_WF.FCMacro"
Linux todo


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:

  • PYTHONPATH
  • PYTHONHOME
  • TCL_LIBRARY
  • TCLLIBPATH

OpenCascade related environment variables:

  • CSF_MDTVFontDirectory
  • CSF_MDTVTexturesDirectory
  • CSF_UnitsDefinition
  • CSF_UnitsLexicon
  • CSF_StandardDefaults
  • CSF_PluginDefaults
  • CSF_LANGUAGE
  • CSF_SHMessage
  • CSF_XCAFDefaults
  • CSF_GraphicShr
  • CSF_IGESDefaults
  • CSF_STEPDefaults

System related environment variables:

  • 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!

User config entries
Config var name Synopsis Example
BuildVersionMajor Major Version number of the Build. Defined in src/Build/Version.h.in 0
BuildVersionMinor Minor Version number of the Build. Defined in src/Build/Version.h.in 7
BuildRevision SVN Repository Revision number of the src in the Build. Generated by SVN 356
BuildRevisionRange Range of different changes 123-356
BuildRepositoryURL Repository URL https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk/src
BuildRevisionDate Date of the above Revision 2007/02/03 22:21:18
BuildScrClean Indicates if the source was changed after checkout Src modified
BuildScrMixed Src not mixed

Branding related

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

User config entries
Config var name Synopsis Example
ExeName Name of the build Executable file. Can differ from FreeCAD if a different main.cpp is used. FreeCAD.exe
ExeVersion Over all Version shows up at start time V0.7
AppIcon Icon which is used for the Executable, shows in Application MainWindow. "FCIcon"
ConsoleBanner Banner which is prompted in console mode
SplashPicture Name of the Icon used for the Splash Screen "FreeCADSplasher"
SplashAlignment Alignment of the Text in the Splash dialog "Bottom" or "Left"
SplashTextColor Color of the splasher Text "#000000"
StartWorkbench Name of the Workbench which get started automatically after Startup "Part design"
HiddenDockWindow List of dockwindows (separated by a semicolon) which will be disabled "Property editor"

Related Pages