From: Mirko Günther <renegart@gmx.de>
Subject: Start XDG autostart applications with the Lomiri session

Nothing pulls in xdg-desktop-autostart.target, so the units generated by
systemd-xdg-autostart-generator from /etc/xdg/autostart are never
started, e.g. spice-vdagent.

Pull the target in with the shell. Its units are ordered after
graphical-session.target and stop together with it. Also clear DISPLAY,
which Lomiri exports for them, when the shell stops.

--- a/systemd/lomiri.service.in
+++ b/systemd/lomiri.service.in
@@ -10,12 +10,13 @@
 Before=lomiri-keyboard.service
 Wants=user-session-migration.service
 After=user-session-migration.service
+Wants=xdg-desktop-autostart.target
 
 [Service]
 Type=notify
 SyslogIdentifier=lomiri
 ExecStart=@CMAKE_INSTALL_FULL_BINDIR@/lomiri-session
-ExecStopPost=@DUAE_BIN@ --systemd WAYLAND_DISPLAY=
+ExecStopPost=@DUAE_BIN@ --systemd WAYLAND_DISPLAY= DISPLAY=
 
 # Start this target on stop to ends all applications launched through LAL,
 # including those that are SIGSTOP'ed by us. Don't care about the failure
