Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update yoe-kiosk-browser and add options #974

Merged
merged 2 commits into from
Oct 6, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9"

SRC_URI = "git://github.com/YoeDistro/yoe-kiosk-browser;branch=main;protocol=https"
SRCREV = "738469237165cf991a24541e18ce99909b3806d4"
SRCREV = "47846c7a62aea8317070f4a79b80cd26ded74bdd"

PV = "1.0.0+git"

Expand All @@ -23,19 +23,41 @@ INITSCRIPT_PARAMS = "start 99 5 . stop 20 6 ."
# You can override the following settings in site.conf, etc.
# Default to Simple IoT.
YOE_KIOSK_BROWSER_URL ?= "http://localhost:8118"

# Currently, values of 0, 90, and 270 are supported
YOE_KIOSK_BROWSER_ROTATE ?= "0"

# the following scale should be <= 1
YOE_KIOSK_BROWSER_KEYBOARD_SCALE ?= "1"

# start full screen
YOE_KIOSK_BROWSER_FULLSCREEN ?= "1"

# If you have no trouble with default dialogs, enable them here
YOE_KIOSK_BROWSER_DEFAULT_DIALOGS ?= "0"
YOE_KIOSK_BROWSER_DIALOG_COLOR ?= "#D91824"

# On some touchscreens the first input of a touch event wont activate the
# correct focus. This quirk solves this issue.
YOE_KIOSK_BROWSER_TOUCH_QUIRK ?= "1"

# the following is the interval at which we try
# to reload a failed web page (seconds)
# default is 5s if not specified.
YOE_KIOSK_BROWSER_RETRY_INTERVAL = "10"

# the following is typically a local web page that is loaded
# instead of the default error screen.
# If this is not set, the default error screen is shown.
YOE_KIOSK_BROWSER_EXCEPTION_URL=""

# In case you use your own trusted https webserver on your local browser
# you can ignore the certification errors.
YOE_KIOSK_BROWSER_IGNORE_CERT_ERR ?= "1"

# Running the browser in root will require disabled sandbox mode
QTWEBENGINE_DISABLE_SANDBOX ?= "1"

# Depending upon screen attached to system
SCREEN_RESOLUTION ?= "1024x600"

Expand All @@ -60,9 +82,30 @@ do_install:append() {
sed -i "s|@KEYBOARD_SCALE@|${YOE_KIOSK_BROWSER_KEYBOARD_SCALE}|" \
${D}${sysconfdir}/default/yoe-kiosk-browser

sed -i "s|@FULLSCREEN@|${YOE_KIOSK_BROWSER_FULLSCREEN}|" \
${D}${sysconfdir}/default/yoe-kiosk-browser

sed -i "s|@DEFAULT_DIALOGS@|${YOE_KIOSK_BROWSER_DEFAULT_DIALOGS}|" \
${D}${sysconfdir}/default/yoe-kiosk-browser

sed -i "s|@DIALOG_COLOR@|${YOE_KIOSK_BROWSER_DIALOG_COLOR}|" \
${D}${sysconfdir}/default/yoe-kiosk-browser

sed -i "s|@TOUCH_QUIRK@|${YOE_KIOSK_BROWSER_TOUCH_QUIRK}|" \
${D}${sysconfdir}/default/yoe-kiosk-browser

sed -i "s|@RETRY_INTERVAL@|${YOE_KIOSK_BROWSER_RETRY_INTERVAL}|" \
${D}${sysconfdir}/default/yoe-kiosk-browser

sed -i "s|@EXCEPTION_URL@|${YOE_KIOSK_BROWSER_EXCEPTION_URL}|" \
${D}${sysconfdir}/default/yoe-kiosk-browser

sed -i "s|@IGNORE_CERT_ERR@|${YOE_KIOSK_BROWSER_IGNORE_CERT_ERR}|" \
${D}${sysconfdir}/default/yoe-kiosk-browser

sed -i "s|@DISABLE_SANDBOX@|${QTWEBENGINE_DISABLE_SANDBOX}|" \
${D}${sysconfdir}/default/yoe-kiosk-browser

sed -i "s|@@|${YOE_KIOSK_BROWSER_KEYBOARD_SCALE}|" \
${D}${sysconfdir}/default/yoe-kiosk-browser

Expand All @@ -72,6 +115,11 @@ do_install:append() {
sed -i "s|@DISPLAY_CARD@|${DISPLAY_CARD}|" \
${D}${sysconfdir}/default/eglfs.json

if [ "${YOE_KIOSK_BROWSER_XCB}" = "1" ]; then
echo "DISPLAY=:0" >> ${D}${sysconfdir}/default/yoe-kiosk-browser
echo "XAUTHORITY=/home/root/.Xauthority" >> ${D}${sysconfdir}/default/yoe-kiosk-browser
echo "QT_QPA_PLATFORM=xcb" >> ${D}${sysconfdir}/default/yoe-kiosk-browser
fi
}

SYSTEMD_SERVICE:${PN} = "yoe-kiosk-browser.service"
Expand Down