summaryrefslogtreecommitdiff
path: root/src/Compositor.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2023-03-04 15:20:23 +0000
committervaxerski <43317083+vaxerski@users.noreply.github.com>2023-03-04 15:21:27 +0000
commitfea2031bfe3fe66e5e30b3f3709683ee445fcfc1 (patch)
treec66b6e049690bf5a67ff1fda93b47f49948afd21 /src/Compositor.cpp
parentbe22172a359f3bd9b922336fb76fde75b604af9b (diff)
systemd: expand sysd import env script
Diffstat (limited to 'src/Compositor.cpp')
-rw-r--r--src/Compositor.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index fed97611..aae6328e 100644
--- a/src/Compositor.cpp
+++ b/src/Compositor.cpp
@@ -434,7 +434,11 @@ void CCompositor::startCompositor() {
signal(SIGPIPE, SIG_IGN);
if (m_sWLRSession /* Session-less Hyprland usually means a nest, don't update the env in that case */ && fork() == 0)
- execl("/bin/sh", "/bin/sh", "-c", "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP HYPRLAND_INSTANCE_SIGNATURE", nullptr);
+ execl(
+ "/bin/sh", "/bin/sh", "-c",
+ "systemctl --user import-environment DISPLAY WAYLAND_DISPLAY HYPRLAND_INSTANCE_SIGNATURE XDG_CURRENT_DESKTOP && hash dbus-update-activation-environment 2>/dev/null && "
+ "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP HYPRLAND_INSTANCE_SIGNATURE",
+ nullptr);
Debug::log(LOG, "Running on WAYLAND_DISPLAY: %s", m_szWLDisplaySocket.c_str());