From d541c433bbc66c9ad889fc96c05efddcc8ec5016 Mon Sep 17 00:00:00 2001 From: ComixHe Date: Wed, 3 Apr 2024 13:22:07 +0800 Subject: [PATCH] fix: take GIO env back Signed-off-by: ComixHe --- src/dbus/applicationservice.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/dbus/applicationservice.cpp b/src/dbus/applicationservice.cpp index d38ed06..fe8e3a1 100644 --- a/src/dbus/applicationservice.cpp +++ b/src/dbus/applicationservice.cpp @@ -40,8 +40,13 @@ void ApplicationService::appendExtraEnvironments(QVariantMap &runtimeOptions) co } const QString &env = environ(); - if (!env.isEmpty()) + if (!env.isEmpty()) { + //NOTE: prepend this directly may lead some error oldEnv.prepend(env); + } + + // NOTE: dde-dock need this environment variable for now, maybe we could remove it after we finish refactoring dde-shell. + oldEnv.append(QString{"GIO_LAUNCHED_DESKTOP_FILE=%1;"}.arg(m_desktopSource.sourcePath())); runtimeOptions.insert("env", oldEnv); }