Environment variables

From Inkscape Wiki
Revision as of 18:53, 8 July 2019 by Patrick87 (talk | contribs) (Add section on glib / gtk)
Jump to navigation Jump to search

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.

Inkscape

Environment variables specific to Inkscape:

INKSCAPE_PROFILE_DIR
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)
INKSCAPE_DATADIR
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.
INKSCAPE_LOCALEDIR
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).

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_warning() and g_critical(). Setting it to fatal-criticals will only abort on calls to g_critical().

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 GTK_DEBUG=interactive