From f4c82bcdfe1d65f66ea10385b45e625dcbbede97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Hedin=20Br=C3=B8nner?= Date: Thu, 19 Sep 2019 10:42:04 +0200 Subject: [PATCH] debug: support native systemd services 3.34 can run sessions using systemd user services. Use these if available to access the journal. --- debug | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/debug b/debug index 17131ee..8e1df8c 100755 --- a/debug +++ b/debug @@ -51,7 +51,11 @@ function decode-multiline-message { } function gnome-shell-exe-path { - if uname -a | grep --silent "NixOS"; then + if systemctl --user status gnome-shell-x11.service > /dev/null; then + echo --user-unit=gnome-shell-x11.service + elif systemctl --user status gnome-shell-wayland.service > /dev/null; then + echo --user-unit=gnome-shell-wayland.service + elif uname -a | grep --silent "NixOS"; then echo $(dirname =gnome-shell(:A))/.gnome-shell-wrapped else echo =gnome-shell