aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-demo/flutter-homescreen
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-demo/flutter-homescreen')
-rw-r--r--recipes-demo/flutter-homescreen/files/flutter-homescreen.service4
-rw-r--r--recipes-demo/flutter-homescreen/flutter-homescreen_git.bb10
2 files changed, 8 insertions, 6 deletions
diff --git a/recipes-demo/flutter-homescreen/files/flutter-homescreen.service b/recipes-demo/flutter-homescreen/files/flutter-homescreen.service
index a57fc5cc5..6a1eabeab 100644
--- a/recipes-demo/flutter-homescreen/files/flutter-homescreen.service
+++ b/recipes-demo/flutter-homescreen/files/flutter-homescreen.service
@@ -3,10 +3,12 @@ Requires=agl-compositor.service
After=agl-compositor.service
[Service]
+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
diff --git a/recipes-demo/flutter-homescreen/flutter-homescreen_git.bb b/recipes-demo/flutter-homescreen/flutter-homescreen_git.bb
index 0bd1ae19b..62ea1e176 100644
--- a/recipes-demo/flutter-homescreen/flutter-homescreen_git.bb
+++ b/recipes-demo/flutter-homescreen/flutter-homescreen_git.bb
@@ -20,14 +20,14 @@ FLUTTER_APPLICATION_INSTALL_PREFIX = "/flutter"
FLUTTER_BUILD_ARGS = "bundle -v"
-inherit flutter-app
+inherit flutter-app systemd
APP_CONFIG = "${BPN}.json"
+SYSTEMD_SERVICE:${PN} = "flutter-homescreen.service"
+
do_install:append() {
- install -D -m 0644 ${WORKDIR}/${BPN}.service ${D}${systemd_user_unitdir}/${BPN}.service
- install -d ${D}${systemd_user_unitdir}/agl-session.target.wants
- ln -s ../${BPN}.service ${D}${systemd_user_unitdir}/agl-session.target.wants/${BPN}.service
+ install -D -m 0644 ${WORKDIR}/${BPN}.service ${D}${systemd_system_unitdir}/${BPN}.service
install -D -m 0644 ${WORKDIR}/${APP_CONFIG} ${D}${datadir}/flutter/${BPN}.json
@@ -35,5 +35,5 @@ do_install:append() {
install -m 0644 ${WORKDIR}/homescreen_config.yaml ${D}${sysconfdir}/xdg/AGL/
}
-FILES:${PN} += "${datadir} ${systemd_user_unitdir} ${sysconfdir}/xdg/AGL"
+FILES:${PN} += "${datadir} ${sysconfdir}/xdg/AGL"
RDEPENDS:${PN} += "flutter-auto agl-flutter-env"