summaryrefslogtreecommitdiff
path: root/src/config/ConfigManager.cpp
diff options
context:
space:
mode:
authorKainoa Kanter <44733677+ThatOneCalculator@users.noreply.github.com>2022-06-09 12:58:07 -0700
committerGitHub <noreply@github.com>2022-06-09 12:58:07 -0700
commit750961e9c10fbef6c6a45ca58fd33f15db730409 (patch)
tree9c57d11f6f157070443d05e0391a052ca2dc1661 /src/config/ConfigManager.cpp
parentb7e21d0fa9b9b00e769bcf9cca985ee70973ebcc (diff)
parentb5a446ddfd1ecdae27f44b610acb33578d9ec5e3 (diff)
Merge branch 'vaxerski:main' into main
Diffstat (limited to 'src/config/ConfigManager.cpp')
-rw-r--r--src/config/ConfigManager.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp
index ad5ea5a7..56548580 100644
--- a/src/config/ConfigManager.cpp
+++ b/src/config/ConfigManager.cpp
@@ -156,8 +156,18 @@ void CConfigManager::configSetValueSafe(const std::string& COMMAND, const std::s
void CConfigManager::handleRawExec(const std::string& command, const std::string& args) {
// Exec in the background dont wait for it.
+
+ std::string toExec = args;
+
+ if (g_pXWaylandManager->m_sWLRXWayland)
+ toExec = std::string("WAYLAND_DISPLAY=") + std::string(g_pCompositor->m_szWLDisplaySocket) + " DISPLAY=" + std::string(g_pXWaylandManager->m_sWLRXWayland->display_name) + " " + toExec;
+ else
+ toExec = std::string("WAYLAND_DISPLAY=") + std::string(g_pCompositor->m_szWLDisplaySocket) + " " + toExec;
+
+ Debug::log(LOG, "Config executing %s", toExec.c_str());
+
if (fork() == 0) {
- execl("/bin/sh", "/bin/sh", "-c", args.c_str(), nullptr);
+ execl("/bin/sh", "/bin/sh", "-c", toExec.c_str(), nullptr);
_exit(0);
}