From a93465ed69f8e69e36428de3c559b60e329b51d8 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Thu, 26 Oct 2023 16:04:46 +0200 Subject: [PATCH] networkAgent: Fetch environment from launch context before spawn_async() This will fetch the right environment for the launched application, without using GNOME Shell's environment. Part-of: --- js/ui/components/networkAgent.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/ui/components/networkAgent.js b/js/ui/components/networkAgent.js index 6a4aa7747..3d187a878 100644 --- a/js/ui/components/networkAgent.js +++ b/js/ui/components/networkAgent.js @@ -455,11 +455,12 @@ class VPNRequestHandler extends Signals.EventEmitter { this._newStylePlugin = authHelper.externalUIMode; try { + const launchContext = global.create_app_launch_context(0, -1); let [success_, pid, stdin, stdout, stderr] = GLib.spawn_async_with_pipes( null, /* pwd */ argv, - null, /* envp */ + launchContext.get_environment(), GLib.SpawnFlags.DO_NOT_REAP_CHILD, () => { try {