This is a list of some helpful environment variables, that you can use to modify the behavior of Inkscape itself as well as of the libraries it uses.
Environment variables specific to Inkscape
- Specifies a different location for the user profile directory (i.e. the folder where preferences and user data are saved).
- By default this equals to something like ~/.config/inkscape (*nix) or %appdata%/inkscape (Windows)
- Specifies a different location for the Inkscape data directory (i.e. the system folder where Inkscape looks for shared files).
- By default this equals to something like /share (*nix) or %ProgramFiles%/Inkscape/share (Windows).
- Make sure there's a share/inkscape folder present in this location that contains system-wide Inkscape data like extensions, filters, gradients, icons, etc.
- Specifies a different location for the folder where Inkscape looks for the translation catalog (i.e. binary inkscape.mo files).
- By default this equals to something like /share/locale (*nix) or %ProgramFiles%/Inkscape/share/locale (Windows).
System-wide environment variables that directly affect Inkscape
- Sets the system locale (i.e. the language used by the system) and will override Inkscape's default interface language.
- For example setting something like
LANG=fr_FR.UTF-8will cause Inkscape to use French by default.
glib / gtk
Environment variables specific to Inkscape's core libraries and GUI toolkit. For a full list, see
Particularly helpful for general debugging purposes are the environment variables that control debug output, namely glib's
G_MESSAGES_DEBUG and gtk's
GTK_DEBUG. Setting either of those to the special value
all will print a lot of additional debug output to the console. Be aware that there will be a lot of output when using
all, so you might want to fine-tune the debug options to only output information of relevant program components.
To trace warnings and critical debug messages, the environment variable
G_DEBUG can prove useful. Setting it's value to
fatal-warnings causes glib to abort the program on all warnings, i.e. the first call to either of
g_critical(). Setting it to
fatal-criticals will only abort on calls to
Visually debugging gtk
A very helpful way to "debug" GUI issues (like fine-tuning CSS or inspecting the individual parts of the GUI and their properties) is the GTK Inspector. It can be accessed by setting the environment variable
Environment variables specific to Python:
- Allows you to add additional directories to the list of paths Python is searching for modules to load.
- Usually there's no need to adjust this variable (Inkscape adds the system-wide extensions directory as well as the extensions directory in the user profile folder automatically). However if you're writing an extension and would like to load some modules from other locations this is an way to do this. Note that Inkscape will prepend the
PYTHONPATHwith the default module locations, so you can't use this method to override modules shipped with Inkscape.