Many programs do not need $DISPLAY, like kpackagetool5. Still, if $DISPLAY is not set, kcrash prints "Error: could not determine $DISPLAY." on startup. This shows up during cmake runs, for instance: [ 229s] CMake Warning at /usr/lib/cmake/KF5Package/KF5PackageMacros.cmake:67 (message): [ 229s] warnings during generation of metainfo for org.kde.desktopcontainment: [ 229s] Error: could not determine $DISPLAY. [ 229s] [ 229s] Call Stack (most recent call first): [ 229s] /usr/lib/cmake/KF5Plasma/KF5PlasmaMacros.cmake:34 (kpackage_install_package) [ 229s] containments/desktop/CMakeLists.txt:3 (plasma_install_package)