You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
1.3 KiB
30 lines
1.3 KiB
diff -r -U3 plasma-workspace-5.18.4.1.orig/startkde/startplasma.cpp plasma-workspace-5.18.4.1/startkde/startplasma.cpp
|
|
--- plasma-workspace-5.18.4.1.orig/startkde/startplasma.cpp 2020-03-31 17:33:37.000000000 +0300
|
|
+++ plasma-workspace-5.18.4.1/startkde/startplasma.cpp 2020-04-03 12:47:34.812587755 +0300
|
|
@@ -22,6 +22,8 @@
|
|
#include <QStandardPaths>
|
|
#include <QTextStream>
|
|
#include <QDBusConnectionInterface>
|
|
+#include <QRegularExpression>
|
|
+#include <QProcessEnvironment>
|
|
#include <KConfig>
|
|
#include <KConfigGroup>
|
|
|
|
@@ -265,6 +267,16 @@
|
|
// In that case, the update in startplasma might be too late.
|
|
bool syncDBusEnvironment()
|
|
{
|
|
+ const QRegularExpression re(QString::fromUtf8("[^A-Z0-9_]"));
|
|
+ const auto env = QProcessEnvironment::systemEnvironment();
|
|
+ for (const auto &key : env.keys()) {
|
|
+ const auto match = re.match(key);
|
|
+ if (match.hasMatch()) {
|
|
+// qDebug() << "environment variable filtered:" << key;
|
|
+ qunsetenv(key.toUtf8().constData());
|
|
+ }
|
|
+ }
|
|
+
|
|
int exitCode;
|
|
// At this point all environment variables are set, let's send it to the DBus session server to update the activation environment
|
|
if (!QStandardPaths::findExecutable(QStringLiteral("dbus-update-activation-environment")).isEmpty()) {
|