GUI kiosk on prodution resinOS


#1

Use case:

Enable chromium kiosk gui on resin device using xorg/xinit/chromium.

Solution:

I have managed to get a chromium kiosk web gui working on Resin OS 2.13.1+rev1 development device. The container starts as expected and show the web page as expected and input work as expected.

Issue:

On the production device nothing happens when I load the chromium kiosk gui container. The resin splash screen just stays. Nothing happens.

How can similar container be used on Resin OS 2.13.1+rev1 production?

I have read about RESIN_HOST_CONFIG_disable_splash, but it does not seems to do anything.

Anybody tried xorg/xinit/xstart on production resin os devices?


#4

Have you taken a look at https://github.com/resin-io-projects/resin-wpe, it renders web content to a hdmi output and is likely to contain a lot of wisdom for your use case.


#7

This issue was related to xinit permissions.

This https://bugs.launchpad.net/ubuntu/+source/xinit/+bug/1562219 guided me to the solution.

xinit must be started as root:

The two scripts show how the xinit/chromium can be started.

Entrypoint:

#!/bin/bash
xinit /home/viewer/launchBrowser.sh – -nocursor

LaunchBrowser.sh

#!/bin/bash
#Disable DPMS / Screen blanking
xset -dpms
xset s off
xset s noblank

url=$url
default=‘http://scripty2.com/demos/touch/

su -c “/usr/bin/chromium --kiosk --start-fullscreen -a ${url:-$default}” --window-size=1366,786" viewer

Dependencies:

apt-get install -y chromium xorg xinit xinput xserver-xorg xserver-xorg-legacy xserver-xorg-input-evdev xserver-xorg-input-libinput x11-xserver-utils


#8

Glad you sorted this out, and thanks for following up with your solution @aliasbits!


#9

Additional information for chromium on intel-nuc-debian

Dockerfile

FROM resin/intel-nuc-debian:stretch

USER root

RUN apt-get update && apt-get install -y --no-install-recommends \
chromium \
xorg \
xinit \
xinput \
xserver-xorg \
xserver-xorg-legacy \
xserver-xorg-input-evdev \
xserver-xorg-input-libinput \
x11-xserver-utils && \
apt-get clean && rm -rf /var/lib/apt/lists/*

RUN sed -i ‘s|allowed_users=console|allowed_users=anybody|’ /etc/X11/Xwrapper.config

RUN groupmod -g 19 input # may differ

RUN groupadd viewer && \
echo ‘notsecure\nnotsecure’ | adduser --home /home/viewer --ingroup viewer viewer && \
usermod -aG tty viewer && \
usermod -aG input viewer

COPY entrypoint.sh /home/viewer/entrypoint.sh
COPY launchBrowser.sh /home/viewer/launchBrowser.sh
RUN chmod +x /home/viewer/*
RUN chown viewer:viewer /home/viewer/*

CMD [ “/bin/bash”, “/home/viewer/entrypoint.sh” ]