#1151970 sway: Config assumes systemctl is present and produces and error on non-systemd systems

Package:
sway
Source:
sway
Description:
i3-compatible Wayland compositor
Submitter:
Mark Hindley
Date:
2026-10-25 10:51:02 UTC
Severity:
normal
Tags:
#1151970#3
Date:
2026-10-25 10:48:57 UTC
From:
To:
Dear Maintainer,

On non-systemd systems where systemctl is not available, the default sway
configuration produces a startup error:

 sh: 1: systemctl: not found

Protecting the invocation of systemctl with a check for its existence fixes the
error and allows normal startup.

I suggest the patch below, matching the existing coding pattern.

Thanks

Mark
--- /tmp/ediffFnliNh	2026-10-25 10:43:53.124090910 +0000
+++ /tmp/ediffgsKEJr	2026-10-25 10:43:53.148090350 +0000
@@ -3,7 +3,8 @@
 # see also https://github.com/swaywm/sway/issues/5732
 # and https://github.com/systemd/systemd/blob/dfc637d0ff756889e8e5b7cb4ec991eb06069aa1/xorg/50-systemd-user.sh