From 4a17a26a6df1c020e286cb126459e046c7f6ae9e Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 21 Jun 2023 14:26:33 +0200 Subject: [PATCH] Python: Allow redirecting the display for remote setups Change-Id: I83baa9c74a1586590147668c9fea661018101776 Reviewed-by: David Schulz --- src/plugins/python/pythonrunconfiguration.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/plugins/python/pythonrunconfiguration.cpp b/src/plugins/python/pythonrunconfiguration.cpp index e7c5b4dee14..42cd8a8e9ae 100644 --- a/src/plugins/python/pythonrunconfiguration.cpp +++ b/src/plugins/python/pythonrunconfiguration.cpp @@ -197,6 +197,14 @@ PythonRunConfiguration::PythonRunConfiguration(Target *target, Id id) addAspect(macroExpander(), nullptr); addAspect(); + if (HostOsInfo::isAnyUnixHost()) + addAspect(macroExpander()); + + setRunnableModifier([this](Runnable &r) { + if (const auto * const forwardingAspect = aspect()) + r.extraData.insert("Ssh.X11ForwardToDisplay", forwardingAspect->display()); + }); + setCommandLineGetter([bufferedAspect, interpreterAspect, argumentsAspect, scriptAspect] { CommandLine cmd{interpreterAspect->currentInterpreter().command}; if (!bufferedAspect->value())