From f9ad274e28a5d07997d441051d97d7bf9c255a47 Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Mon, 26 Feb 2024 11:18:10 +0100 Subject: [PATCH] Make sure the plugin runs with `LD_LIBRARY_PATH` Not sure why the environment isn't taken over. Contribute to CURA-11356 --- cura/BackendPlugin.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cura/BackendPlugin.py b/cura/BackendPlugin.py index 11f73a71b5..b3c236535b 100644 --- a/cura/BackendPlugin.py +++ b/cura/BackendPlugin.py @@ -92,10 +92,13 @@ class BackendPlugin(AdditionalSettingDefinitionsAppender, PluginObject): "stderr": subprocess.STDOUT, # Combine stderr and stdout "env": os.environ } + run_prep_cmd = "" if Platform.isWindows(): popen_kwargs["creationflags"] = subprocess.CREATE_NO_WINDOW + else: + run_prep_cmd = f"LD_LIBRARY_PATH={os.environ['LD_LIBRARY_PATH']}:$LD_LIBRARY_PATH " Logger.info(f"Starting plugin with: {popen_kwargs}") - self._process = subprocess.Popen(self._validatePluginCommand(), **popen_kwargs) + self._process = subprocess.Popen(f"{run_prep_cmd}{self._validatePluginCommand()}", **popen_kwargs) self._is_running = True return True except PermissionError: