From 6ca247d19f2a0d7cc0cb1beb8d26c99e7fac337b Mon Sep 17 00:00:00 2001 From: Ronan Le Martret Date: Wed, 19 Apr 2017 16:16:03 +0200 Subject: Run weston with dedicated 'display' user and group MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Create a user/group display * Allow weston to start without mandatory root user * start weston-terminal for each user Bug-AGL: SPEC-546 Change-Id: Id50acdbf5f7c07d5e0440575d42998b8819b5547 Signed-off-by: Ronan Le Martret Reviewed-on: https://gerrit.automotivelinux.org/gerrit/9135 Tested-by: Jenkins Job builder account ci-image-build: Jenkins Job builder account ci-image-boot-test: Jenkins Job builder account Reviewed-by: Dominig ar Foll Reviewed-by: José Bollo Reviewed-by: Stéphane Desneux Reviewed-by: Jan-Simon Moeller --- .../agl-desktop-config/agl-desktop-config_0.1.bb | 21 +++++++++++++++++++++ .../agl-desktop-config/files/user-weston-term.path | 8 ++++++++ .../files/user-weston-term.service | 12 ++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 meta-app-framework/recipes-graphics/agl-desktop-config/agl-desktop-config_0.1.bb create mode 100644 meta-app-framework/recipes-graphics/agl-desktop-config/files/user-weston-term.path create mode 100644 meta-app-framework/recipes-graphics/agl-desktop-config/files/user-weston-term.service (limited to 'meta-app-framework/recipes-graphics') diff --git a/meta-app-framework/recipes-graphics/agl-desktop-config/agl-desktop-config_0.1.bb b/meta-app-framework/recipes-graphics/agl-desktop-config/agl-desktop-config_0.1.bb new file mode 100644 index 000000000..e0358d615 --- /dev/null +++ b/meta-app-framework/recipes-graphics/agl-desktop-config/agl-desktop-config_0.1.bb @@ -0,0 +1,21 @@ +SUMMARY = "AGL desktop config" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +SRC_URI += " \ + file://user-weston-term.service \ + file://user-weston-term.path \ +" + +do_install_append() { + install -d ${D}${systemd_user_unitdir} + install -m 0644 ${WORKDIR}/user-weston-term.service ${D}${systemd_user_unitdir} + install -m 0644 ${WORKDIR}/user-weston-term.path ${D}${systemd_user_unitdir} + + install -d ${D}${systemd_user_unitdir}/default.target.wants + ln -sf ${systemd_user_unitdir}/user-weston-term.path ${D}${libdir}/systemd/user/default.target.wants +} + +FILES_${PN} += "${systemd_user_unitdir}/*" +FILES_${PN} += "${systemd_user_unitdir}/default.target.wants/default.target.wants" diff --git a/meta-app-framework/recipes-graphics/agl-desktop-config/files/user-weston-term.path b/meta-app-framework/recipes-graphics/agl-desktop-config/files/user-weston-term.path new file mode 100644 index 000000000..9481840e5 --- /dev/null +++ b/meta-app-framework/recipes-graphics/agl-desktop-config/files/user-weston-term.path @@ -0,0 +1,8 @@ +[Unit] +Description=Terminal for weston user unit path + +[Path] +PathExists=%t/wayland-0 + +[Install] +WantedBy=default.target diff --git a/meta-app-framework/recipes-graphics/agl-desktop-config/files/user-weston-term.service b/meta-app-framework/recipes-graphics/agl-desktop-config/files/user-weston-term.service new file mode 100644 index 000000000..ad8b9583b --- /dev/null +++ b/meta-app-framework/recipes-graphics/agl-desktop-config/files/user-weston-term.service @@ -0,0 +1,12 @@ +[Unit] +Description=Terminal for weston user +After=user-config.service +Requires=user-config.service + +[Service] +Type=simple +ExecStart=/usr/bin/weston-terminal +Restart=always + +[Install] +WantedBy=multi-user.target -- cgit 1.2.3-korg