From fbb6ec253724d6e5a8512b28747adde04b9e2514 Mon Sep 17 00:00:00 2001 From: Jiri Kortus Date: Thu, 24 Oct 2024 16:17:37 +0200 Subject: [PATCH] [RTT-5714] Use launch delay only with Xorg When the delay in ExecStartPre in unit file is used with Wayland (gnome-kiosk), it makes the gnome-kiosk launcher (run-in-new-session) fail for some weird reason. At this point it seems that the delay is not necessary with Wayland and/or with the newer version of dogtail. --- etc/systemd/system/anabot.service | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/etc/systemd/system/anabot.service b/etc/systemd/system/anabot.service index c26294e..4d729b1 100644 --- a/etc/systemd/system/anabot.service +++ b/etc/systemd/system/anabot.service @@ -5,7 +5,14 @@ ConditionArchitecture=!s390 ConditionArchitecture=!s390x [Service] -ExecStartPre=/usr/bin/sleep 30 +# Use sleep (to avoid occasional weird dogtail tracebacks) with Xorg only. +# It's actually a workaround - the sleep can't be used here generally, i. e. +# even with Wayland, as gnome-kiosk would fail to start - it's likely a bug in +# the launcher script in Anaconda (run-in-new-session) or gnome-kiosk. +# It seems the delay shouldn't be needed with Wayland (and/or with the new version +# of dogtail). If it turns out it's not the case, we should remove the sleep +# from here and implement it it launcher.py. +ExecStartPre=sh -c "ps aux | grep -q gnome-kiosk || sleep 30" ExecStart=/opt/python_launcher.sh /opt/launcher.py anaconda_installer Environment="ANABOT_MODULES=/opt/anabot-modules" Environment="ANABOT_CONF=/opt/anabot.ini"