From a4df51435a0683cb54a2101fb9ac44717a663cca Mon Sep 17 00:00:00 2001 From: Arnaud Ferraris Date: Tue, 7 Dec 2021 18:31:37 +0100 Subject: meta-app-framework: add new agl-session recipe For the new App FW, we want to create a systemd user session, to be started on boot, which will be used to start the compositor and all user background services. This commit adds the corresponding target and service file (enabled by default) so the session is started on boot. Bug-AGL: SPEC-4161 Signed-off-by: Arnaud Ferraris Change-Id: I51ca7e0c1a994c6798b20b2592bec56a07f41c98 Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/26974 ci-image-build: Jenkins Job builder account Tested-by: Jenkins Job builder account ci-image-boot-test: Jenkins Job builder account Reviewed-by: Jan-Simon Moeller --- .../agl-session/files/agl-session.target | 5 +++++ .../agl-session/files/agl-session@.service | 24 ++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 meta-app-framework/recipes-config/agl-session/files/agl-session.target create mode 100644 meta-app-framework/recipes-config/agl-session/files/agl-session@.service (limited to 'meta-app-framework/recipes-config/agl-session/files') diff --git a/meta-app-framework/recipes-config/agl-session/files/agl-session.target b/meta-app-framework/recipes-config/agl-session/files/agl-session.target new file mode 100644 index 000000000..84d9daa5b --- /dev/null +++ b/meta-app-framework/recipes-config/agl-session/files/agl-session.target @@ -0,0 +1,5 @@ +[Unit] +Description=AGL user session + +BindsTo=graphical-session.target +Before=graphical-session.target diff --git a/meta-app-framework/recipes-config/agl-session/files/agl-session@.service b/meta-app-framework/recipes-config/agl-session/files/agl-session@.service new file mode 100644 index 000000000..61afa4141 --- /dev/null +++ b/meta-app-framework/recipes-config/agl-session/files/agl-session@.service @@ -0,0 +1,24 @@ +[Unit] +Description=AGL user session +After=systemd-user-sessions.service +Wants=dbus.socket +After=dbus.socket +After=session-c1.scope +Before=multi-user.target + +[Service] +Environment=XDG_SESSION_TYPE=wayland +ExecStart=/bin/systemctl --wait --user start agl-session.target +TimeoutStartSec=30 +# This is a template service, instantiate for desired user's name or uid +User=%i +PAMName=login +WorkingDirectory=~ +StandardInput=tty-fail +StandardOutput=journal +StandardError=journal +Restart=always +RestartSec=3s + +[Install] +WantedBy=multi-user.target -- cgit 1.2.3-korg