diff --git a/startkde/startplasma.cpp b/startkde/startplasma.cpp index 22491952a..dad8d96ee 100644 --- a/startkde/startplasma.cpp +++ b/startkde/startplasma.cpp @@ -330,9 +330,12 @@ void setupPlasmaEnvironment() qputenv("KDE_APPLICATIONS_AS_SCOPE", "1"); // Add kdedefaults dir to allow config defaults overriding from a writable location - const auto current_xdg_config_dirs = qgetenv("XDG_CONFIG_DIRS"); - const auto new_xdg_dir = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation).toUtf8() + "/kdedefaults"; - qputenv("XDG_CONFIG_DIRS", new_xdg_dir + ":" + current_xdg_config_dirs); + QByteArray currentConfigDirs = qgetenv("XDG_CONFIG_DIRS"); + if (currentConfigDirs.isEmpty()) { + currentConfigDirs = "/etc/xdg"; + } + const auto extraConfigDir = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation).toUtf8() + "/kdedefaults"; + qputenv("XDG_CONFIG_DIRS", extraConfigDir + ":" + currentConfigDirs); } void setupX11()