URI: 
       Initial commit - meta-kiosk - yocto meta-layer to build a kiosk screen
  HTML git clone git@git.drkhsh.at/meta-kiosk.git
   DIR Log
   DIR Files
   DIR Refs
   DIR README
       ---
   DIR commit 31a97d9b6c10ecab9ab8f3f93f83e9a1a04025c7
  HTML Author: drkhsh <drkhsh@escpe.net>
       Date:   Fri, 16 Aug 2024 01:25:04 +0200
       
       Initial commit
       
       Diffstat:
         A COPYING.MIT                         |      17 +++++++++++++++++
         A README                              |      44 +++++++++++++++++++++++++++++++
         A conf/layer.conf                     |      13 +++++++++++++
         A recipes-core/kiosk-autostart/files… |       1 +
         A recipes-core/kiosk-autostart/files… |      20 ++++++++++++++++++++
         A recipes-core/kiosk-autostart/kiosk… |      18 ++++++++++++++++++
         A recipes-core/kiosk-refresh/files/k… |       7 +++++++
         A recipes-core/kiosk-refresh/files/k… |      12 ++++++++++++
         A recipes-core/kiosk-refresh/files/r… |       5 +++++
         A recipes-core/kiosk-refresh/kiosk-r… |      29 +++++++++++++++++++++++++++++
         A recipes-core/user-kiosk/user-kiosk… |      15 +++++++++++++++
         A recipes-extended/packagegroups/pac… |      19 +++++++++++++++++++
         A recipes-support/onboard/onboard/00… |      67 +++++++++++++++++++++++++++++++
         A recipes-support/onboard/onboard_1.… |      30 ++++++++++++++++++++++++++++++
       
       14 files changed, 297 insertions(+), 0 deletions(-)
       ---
   DIR diff --git a/COPYING.MIT b/COPYING.MIT
       @@ -0,0 +1,17 @@
       +Permission is hereby granted, free of charge, to any person obtaining a copy 
       +of this software and associated documentation files (the "Software"), to deal 
       +in the Software without restriction, including without limitation the rights 
       +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
       +copies of the Software, and to permit persons to whom the Software is 
       +furnished to do so, subject to the following conditions:
       +
       +The above copyright notice and this permission notice shall be included in 
       +all copies or substantial portions of the Software.
       +
       +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
       +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
       +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
       +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
       +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
       +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 
       +THE SOFTWARE.
   DIR diff --git a/README b/README
       @@ -0,0 +1,44 @@
       +This README file contains information on the contents of the meta-kiosk layer.
       +
       +Please see the corresponding sections below for details.
       +
       +Dependencies
       +============
       +
       +  URI: openembedded-core
       +  branch: scarthgap
       +
       +  URI: meta-oe
       +  branch: scarthgap
       +
       +  URI: meta-gnome
       +  branch: scarthgap
       +
       +  .
       +  .
       +  .
       +
       +Patches
       +=======
       +
       +Please submit any patches against the meta-kiosk layer to the xxxx mailing list (xxxx@zzzz.org)
       +and cc: the maintainer:
       +
       +Maintainer: drkhsh <me@drkhsh.at>
       +
       +Table of Contents
       +=================
       +
       +  I. Adding the meta-kiosk layer to your build
       + II. Misc
       +
       +
       +I. Adding the meta-kiosk layer to your build
       +=================================================
       +
       +Run 'bitbake-layers add-layer meta-kiosk'
       +
       +II. Misc
       +========
       +
       +--- replace with specific information about the meta-kiosk layer ---
   DIR diff --git a/conf/layer.conf b/conf/layer.conf
       @@ -0,0 +1,13 @@
       +# We have a conf and classes directory, add to BBPATH
       +BBPATH .= ":${LAYERDIR}"
       +
       +# We have recipes-* directories, add to BBFILES
       +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
       +            ${LAYERDIR}/recipes-*/*/*.bbappend"
       +
       +BBFILE_COLLECTIONS += "meta-kiosk"
       +BBFILE_PATTERN_meta-kiosk = "^${LAYERDIR}/"
       +BBFILE_PRIORITY_meta-kiosk = "6"
       +
       +LAYERDEPENDS_meta-kiosk = "core"
       +LAYERSERIES_COMPAT_meta-kiosk = "scarthgap"
   DIR diff --git a/recipes-core/kiosk-autostart/files/kiosk.conf b/recipes-core/kiosk-autostart/files/kiosk.conf
       @@ -0,0 +1 @@
       +URL=https://news.ycombinator.com
   DIR diff --git a/recipes-core/kiosk-autostart/files/session b/recipes-core/kiosk-autostart/files/session
       @@ -0,0 +1,20 @@
       +#!/bin/sh
       +
       +. /data/config/kiosk
       +
       +feh --bg-fill /usr/share/plymouth/themes/spinner/watermark.png
       +
       +xset s off  > /dev/null 2>&1      # don't activate screensaver
       +xset -dpms   > /dev/null 2>&1     # disable DPMS (Energy Star) features.
       +xset s noblank   > /dev/null 2>&1 # don't blank the video device
       +
       +su -l -c "unclutter -idle 0 -root" kiosk &
       +su -l -c "onboard" kiosk &
       +
       +su -l -c "chromium --kiosk --noerrdialogs --hide-crash-restore-bubble \
       +              --no-first-run --hide-scrollbars --pull-to-refresh=1 \
       +              --force-device-scale-factor=0.9 --force-dark-mode \
       +              ${URL:=https://news.ycombinator.com/}" kiosk &
       +
       +exec dbus-run-session matchbox-window-manager -use_titlebar no -use_cursor no
       +
   DIR diff --git a/recipes-core/kiosk-autostart/kiosk-autostart.bb b/recipes-core/kiosk-autostart/kiosk-autostart.bb
       @@ -0,0 +1,18 @@
       +SUMMARY = "Kiosk autostart"
       +
       +LICENSE="MIT"
       +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
       +
       +RDEPENDS:${PN} = "mini-x-session"
       +
       +SRC_URI:append = " file://session \
       +                   file://kiosk.conf"
       +FILES:${PN} += " ${sysconfdir}/mini_x/session /data/config/kiosk"
       +
       +do_install() {
       +    install -d ${D}${sysconfdir}/mini_x
       +    install -m 755 ${WORKDIR}/session ${D}${sysconfdir}/mini_x/session
       +
       +    install -m 755 -d ${D}/data/config
       +    install -m 644 ${WORKDIR}/kiosk.conf ${D}/data/config/kiosk
       +}
   DIR diff --git a/recipes-core/kiosk-refresh/files/kiosk-reload.service b/recipes-core/kiosk-refresh/files/kiosk-reload.service
       @@ -0,0 +1,7 @@
       +[Unit]
       +Description=Run reload in chromium browser
       +
       +[Service]
       +Type=oneshot
       +ExecStart=/usr/bin/refresh-chromium.sh
       +User=kiosk
   DIR diff --git a/recipes-core/kiosk-refresh/files/kiosk-reload.timer b/recipes-core/kiosk-refresh/files/kiosk-reload.timer
       @@ -0,0 +1,12 @@
       +[Unit]
       +Description=Run reload every 24 hours
       +
       +[Timer]
       +OnBoot=1m
       +OnUnitActiveSec=24h
       +Unit=kiosk-reload.service
       +Persistent=false
       +
       +[Install]
       +WantedBy=default.target
       +
   DIR diff --git a/recipes-core/kiosk-refresh/files/refresh-chromium.sh b/recipes-core/kiosk-refresh/files/refresh-chromium.sh
       @@ -0,0 +1,5 @@
       +#!/bin/sh
       +export DISPLAY=:0
       +WID=$(xdotool search --onlyvisible --class chromium | head -n 1)
       +xdotool windowactivate ${WID}
       +xdotool key shift+F5
   DIR diff --git a/recipes-core/kiosk-refresh/kiosk-refresh.bb b/recipes-core/kiosk-refresh/kiosk-refresh.bb
       @@ -0,0 +1,29 @@
       +inherit systemd
       +
       +SUMMARY = "Kiosk refresh"
       +
       +LICENSE="MIT"
       +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
       +
       +RDEPENDS:${PN} = "chromium-x11 xdotool"
       +
       +SRC_URI:append = " file://kiosk-reload.service \
       +                   file://kiosk-reload.timer \
       +                   file://refresh-chromium.sh"
       +
       +SYSTEMD_SERVICE:${PN} = "kiosk-reload.timer"
       +SYSTEMD_AUTO_ENABLE:${PN} = "enable"
       +
       +do_install() {
       +        install -d -m 755 ${D}${bindir}
       +        install -d -m 755 ${D}${sysconfdir}/systemd/system
       +
       +        install -m 0644 ${WORKDIR}/kiosk-reload.service ${D}${sysconfdir}/systemd/system/kiosk-reload.service
       +        install -m 0644 ${WORKDIR}/kiosk-reload.timer ${D}${sysconfdir}/systemd/system/kiosk-reload.timer
       +        install -m 755 ${WORKDIR}/refresh-chromium.sh ${D}${bindir}/refresh-chromium.sh
       +}
       +
       +FILES:${PN} += " ${sysconfdir}/systemd/system/kiosk-reload.service \
       +                 ${sysconfdir}/systemd/system/kiosk-reload.timer \
       +                 ${bindir}/refresh-chromium.sh"
       +
   DIR diff --git a/recipes-core/user-kiosk/user-kiosk.bb b/recipes-core/user-kiosk/user-kiosk.bb
       @@ -0,0 +1,15 @@
       +SUMMARY = "Kiosk image user."
       +LICENSE = "MIT"
       +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
       +
       +PROVIDES = "user-kiosk"
       +RPROVIDES:${PN} = "user-kiosk"
       +
       +inherit useradd
       +USERADD_PARAM:${PN} = " \
       +    --user-group --create-home \
       +    --groups audio,video,shutdown,users \
       +    kiosk"
       +USERADD_PACKAGES = "${PN}"
       +
       +ALLOW_EMPTY:${PN} = "1"
   DIR diff --git a/recipes-extended/packagegroups/packagegroup-kiosk.bb b/recipes-extended/packagegroups/packagegroup-kiosk.bb
       @@ -0,0 +1,19 @@
       +DESCRIPTION = "Common package group list for kiosk image"
       +LICENSE = "GPL-3.0-or-later"
       +
       +inherit packagegroup
       +
       +RDEPENDS:${PN} += " \
       +    kiosk-autostart \
       +    kiosk-refresh \
       +    chromium-x11 \
       +    onboard \
       +    at-spi2-core \
       +    ibus \
       +    matchbox-wm \
       +    unclutter-xfixes \
       +    xdotool \
       +    feh \
       +    user-kiosk \
       +    "
       +
   DIR diff --git a/recipes-support/onboard/onboard/0001-pypredict-lm-Define-error-API-if-platform-does-not-h.patch b/recipes-support/onboard/onboard/0001-pypredict-lm-Define-error-API-if-platform-does-not-h.patch
       @@ -0,0 +1,67 @@
       +From 1c95f64aa342147387ce4b1b7269a5c8b34bd898 Mon Sep 17 00:00:00 2001
       +From: Khem Raj <raj.khem@gmail.com>
       +Date: Thu, 13 Jul 2017 09:01:04 -0700
       +Subject: [PATCH] pypredict/lm: Define error API if platform does not have it
       +
       +error() API is not implemented across all libcs on linux
       +e.g. musl does not provide it.
       +
       +Signed-off-by: Khem Raj <raj.khem@gmail.com>
       +---
       + Onboard/pypredict/lm/lm.cpp         |  1 -
       + Onboard/pypredict/lm/lm.h           | 13 +++++++++++++
       + Onboard/pypredict/lm/lm_dynamic.cpp |  2 --
       + 3 files changed, 13 insertions(+), 3 deletions(-)
       +
       +diff --git a/Onboard/pypredict/lm/lm.cpp b/Onboard/pypredict/lm/lm.cpp
       +index 2e64296..37ae241 100644
       +--- a/Onboard/pypredict/lm/lm.cpp
       ++++ b/Onboard/pypredict/lm/lm.cpp
       +@@ -19,7 +19,6 @@
       + 
       + #include <stdlib.h>
       + #include <stdio.h>
       +-#include <error.h>
       + #include <algorithm>
       + #include <cmath>
       + #include <string>
       +diff --git a/Onboard/pypredict/lm/lm.h b/Onboard/pypredict/lm/lm.h
       +index ed4164a..b8b63ee 100644
       +--- a/Onboard/pypredict/lm/lm.h
       ++++ b/Onboard/pypredict/lm/lm.h
       +@@ -32,6 +32,19 @@
       + #include <algorithm>
       + #include <string>
       + 
       ++#if defined(HAVE_ERROR_H)
       ++#include <error.h>
       ++#else
       ++#include <err.h>
       ++#define _onboard_error(S, E, F, ...) do { \
       ++       if (E) \
       ++               err(S, F ": %s", ##__VA_ARGS__, strerror(E)); \
       ++       else \
       ++               err(S, F, ##__VA_ARGS__); \
       ++} while(0)
       ++
       ++#define error _onboard_error
       ++#endif
       + 
       + // break into debugger
       + // step twice to come back out of the raise() call into known code
       +diff --git a/Onboard/pypredict/lm/lm_dynamic.cpp b/Onboard/pypredict/lm/lm_dynamic.cpp
       +index 7c62824..e7c7f40 100644
       +--- a/Onboard/pypredict/lm/lm_dynamic.cpp
       ++++ b/Onboard/pypredict/lm/lm_dynamic.cpp
       +@@ -17,8 +17,6 @@
       +  * along with this program. If not, see <http://www.gnu.org/licenses/>.
       +  */
       + 
       +-#include <error.h>
       +-
       + #include "lm_dynamic.h"
       + 
       + using namespace std;
       +-- 
       +2.13.2
       +
   DIR diff --git a/recipes-support/onboard/onboard_1.4.1.bb b/recipes-support/onboard/onboard_1.4.1.bb
       @@ -0,0 +1,30 @@
       +SUMMARY = "An onscreen keyboard"
       +LICENSE = "GPL-3.0-only"
       +LIC_FILES_CHKSUM = "file://COPYING.GPL3;md5=8521fa4dd51909b407c5150498d34f4e"
       +
       +DEPENDS += "gtk+3 hunspell libcanberra libxkbfile dconf python3-distutils-extra-native intltool-native"
       +
       +SRC_URI = "https://launchpad.net/onboard/1.4/${PV}/+download/${BPN}-${PV}.tar.gz \
       +           file://0001-pypredict-lm-Define-error-API-if-platform-does-not-h.patch \
       +           "
       +SRC_URI[md5sum] = "1a2fbe82e934f5b37841d17ff51e80e8"
       +SRC_URI[sha256sum] = "01cae1ac5b1ef1ab985bd2d2d79ded6fc99ee04b1535cc1bb191e43a231a3865"
       +
       +inherit features_check setuptools3 pkgconfig gtk-icon-cache gsettings mime-xdg
       +
       +REQUIRED_DISTRO_FEATURES = "x11"
       +
       +FILES:${PN} += " \
       +    ${datadir}/dbus-1 \
       +    ${datadir}/icons \
       +    ${datadir}/gnome-shell \
       +    ${datadir}/help \
       +"
       +
       +RDEPENDS:${PN} += " \
       +    ncurses \
       +    python3-dbus \
       +    python3-pycairo \
       +    python3-pygobject \
       +    python3-image \
       +"