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?
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.
This issue was related to xinit permissions.
This Bug #1562219 “Unprivileged xinit wont start in unallocated vt” : Bugs : xinit package : Ubuntu 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=‘scripty2 | Multitouch demos & tests ’
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
1 Like
lekkas
August 7, 2018, 9:39am
8
Glad you sorted this out, and thanks for following up with your solution @aliasbits !
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” ]