69a7ab07fc
OTD requires WAYLAND_DISPLAY or DISPLAY to be set, otherwise it assumes x11 which, on a WAYLAND display configuration, leads to segfaults on OTD start up. Enforce an ordering so that we wait until the session has initted before doing anything. Upstream has both a check for these environment variables, as well as enforces a RestartSec=3 to prevent immediate restarts. Additionally, it's theoretically possible for DISPLAY to be set before WAYLAND_DISPLAY, causing segmentation faults on wayland set ups, so add an explicit polling condition for that in the ExecStartPre script.