Package: sway
Version: 1.12-1
Severity: normal
Tags: patch

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
 
-exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK 
XDG_CURRENT_DESKTOP
+exec hash systemctl 2>dev/null && \
+        systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK 
XDG_CURRENT_DESKTOP
 
 exec hash dbus-update-activation-environment 2>/dev/null && \
         dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY 
SWAYSOCK "XDG_CURRENT_DESKTOP=${XDG_CURRENT_DESKTOP:-sway:wlroots}"


-- System Information:
Distributor ID: Devuan
Description:    Devuan GNU/Linux 7 (freia/ceres)
Release:        7
Codename:       freia ceres
Architecture: x86_64

Kernel: Linux 7.2.11+deb14-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: OpenRC (via /run/openrc), PID 1: init

Versions of packages sway depends on:
ii  libc6                            2.43-7
ii  libcairo2                        1.18.4-3+b1
ii  libdrm2                          2.4.134-3
ii  libelogind-compat [libsystemd0]  257.13-1
ii  libeudev1 [libudev1]             3.2.14-4
ii  libevdev2                        1.14.0+dfsg-1
ii  libgdk-pixbuf-2.0-0              2.44.8+dfsg-1
ii  libgl1-mesa-dri                  26.1.6-1
ii  libglib2.0-0t64                  2.90.1-2
ii  libinput10                       1.31.3-1
ii  libjson-c5                       0.19+ds-1
ii  libpango-1.0-0                   1.58.2-1
ii  libpangocairo-1.0-0              1.58.2-1
ii  libpcre2-8-0                     10.48-3.1
ii  libpixman-1-0                    0.46.4-1+b2
ii  libudev1                         1:3.2.9+devuan4
ii  libwayland-client0               1.26.0-1
ii  libwayland-cursor0               1.26.0-1
ii  libwayland-server0               1.26.0-1
ii  libwlroots-0.20                  0.20.2-1
ii  libxcb-icccm4                    0.4.2-1+b2
ii  libxcb1                          1.17.0-2+b2
ii  libxkbcommon0                    1.13.1-1
ii  swaybg                           1.2.2-1

Versions of packages sway recommends:
ii  foot     1.28.0-1
ii  polkitd  128-1devuan1
ii  wmenu    0.2.0-1

Versions of packages sway suggests:
ii  sway-backgrounds        1.12-1
ii  swayidle                1.9.0-1
ii  swaylock                1.8.6-1
pn  xdg-desktop-portal-gtk  <none>
pn  xdg-desktop-portal-wlr  <none>

-- no debconf information

Reply via email to