Add explicit applaunchd systemd dependencies
[AGL/meta-agl-demo.git] / recipes-demo / flutter-homescreen / files / flutter-homescreen.service
index 300fb22..3024fce 100644 (file)
@@ -1,10 +1,14 @@
 [Unit]
-Requires=agl-compositor.service
-After=agl-compositor.service
+Requires=agl-compositor.service applaunchd.service
+After=agl-compositor.service applaunchd.service
 
 [Service]
-ExecStart=/usr/bin/flutter-auto --j=/usr/share/flutter/flutter-homescreen.json --xdg-shell-app-id=homescreen
+User=agl-driver
+EnvironmentFile=/etc/default/flutter
+EnvironmentFile=-/etc/default/flutter-homescreen
+Environment=XDG_RUNTIME_DIR=/run/user/1001/
+ExecStart=/usr/bin/flutter-auto --b=/usr/share/flutter/flutter_homescreen/${FLUTTER_VERSION}/${FLUTTER_RUNTIME} --j=/usr/share/flutter/flutter-homescreen.json --xdg-shell-app-id=homescreen
 Restart=on-failure
 
 [Install]
-WantedBy=agl-session.target
+WantedBy=graphical.target