Commit 77f41850 authored by David Edmundson's avatar David Edmundson

Syncronise environment to user systemd session

Summary: Equivalent of dbus-update-activation-environment but in runtime

Test Plan:
Changed cursor theme (with some additional fixes there)
Checked the systemd env via the property on manager1.
It had changed

Reviewers: #plasma, broulik

Reviewed By: #plasma, broulik

Subscribers: broulik, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D27054
parent 03da1aba
......@@ -98,5 +98,16 @@ void UpdateLaunchEnvJob::start()
auto dbusActivationReply = QDBusConnection::sessionBus().asyncCall(dbusActivationMsg);
d->monitorReply(dbusActivationReply);
// _user_ systemd env
QDBusMessage systemdActivationMsg = QDBusMessage::createMethodCall(QStringLiteral("org.freedesktop.systemd1"),
QStringLiteral("/org/freedesktop/systemd1"),
QStringLiteral("org.freedesktop.systemd1.Manager"),
QStringLiteral("SetEnvironment"));
const QString updateString = d->varName + QStringLiteral("=") + d->value;
systemdActivationMsg.setArguments({QVariant(QStringList{updateString})});
auto systemdActivationReply = QDBusConnection::sessionBus().asyncCall(systemdActivationMsg);
d->monitorReply(systemdActivationReply);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment