How to fix KiCad build: no icons but question mark

Problem

When you’ve built KiCad from source (see e.g. How to build KiCad on Ubuntu in 10 minutes) you will often see question marks instead of icons in the KiCad GUI.

./kicad/kicad

KiCad build - Icons not visible

Solution

When KiCad can’t display icons, it will display an error message during startup. On Linux the error message looks like this:

KiCad Error

can't open file '/usr/local/share/kicad/resources/images.tar.gz' (error 2: No such file or directory)

Kicad error message if images are shown as question mark

In case you want to know details about where KiCad looks for images.tar.gz, you can check out our separate post Where does KiCad look for images.tar.gz?

To fix this issue, simply set the environment variable KICAD_RUN_FROM_BUILD_DIR to 1:

KICAD_RUN_FROM_BUILD_DIR=1 ./kicad/kicad

or export it in your shell:

export KICAD_RUN_FROM_BUILD_DIR=1
./kicad/kicad