fix: kded6 wrapper script — definitive Qt6 Wayland crash prevention

kded6 wrapper (/usr/bin/kded6 → kded6-wrapper.sh → kded6.real):
- Sets QT_QPA_PLATFORM=offscreen before executing real kded6
- Works regardless of launch mechanism (init, D-Bus, direct)
- No dependency on #ifdef Q_OS_REDOX, D-Bus Environment=, or build cache
- kded6 is a headless D-Bus daemon — Wayland adds no functionality

redox.patch: added null guards to wayland-client.c (wl_proxy_add_listener,
wl_proxy_get_version, wl_proxy_get_display) — durable patch for when
libwayland build is fixed.
This commit is contained in:
2026-05-06 16:10:18 +01:00
parent 0a034fa79b
commit 5a8014fe7c
3 changed files with 42 additions and 0 deletions
+8
View File
@@ -39,6 +39,14 @@ cmake "${COOKBOOK_SOURCE}" \
cmake --build . -j${COOKBOOK_MAKE_JOBS}
DESTDIR="${COOKBOOK_STAGE}" cmake --install . --prefix /usr
# Prevent Qt6 Wayland crash on Redox: wrap kded6 with QT_QPA_PLATFORM=offscreen.
# kded6 is a headless D-Bus daemon — Wayland is unnecessary.
if [ -f "${COOKBOOK_STAGE}/usr/bin/kded6" ]; then
mv "${COOKBOOK_STAGE}/usr/bin/kded6" "${COOKBOOK_STAGE}/usr/bin/kded6.real"
cp "${COOKBOOK_SOURCE}/kded6-wrapper.sh" "${COOKBOOK_STAGE}/usr/bin/kded6"
chmod +x "${COOKBOOK_STAGE}/usr/bin/kded6"
fi
for lib in "${COOKBOOK_STAGE}/usr/lib/"libKF6*.so.*; do
[ -f "${lib}" ] || continue
patchelf --remove-rpath "${lib}" 2>/dev/null || true