Container Keyboard to Chromium Kiosk?


#1

Hey folks…

First post. We really love balenaOS and balenaCloud.

We are trying to deploy multiple PIs that launch chromium in kiosk mode. Everything is loading up and running and chromium loads the kiosk site correctly, but the local input devices are not seen by chromium for some reason. DMESG from within the container does show the touchscreen, keyboard, mouse and wedge scanner.

Am I missing something obvious??


#2

Hey Jay,

One of my colleagues pointed me over to this article. Can you confirm the following?

  • Make sure your container is privileged in docker-compose.yml
  • Make sure you enable udevd
  • Which base container image are you using?

Cheers,
Trevor Sullivan


#3

Thanks Trevor. See below. I am assuming udev is enabled as udevadm does seem to work … though issuing udev from the CLI returns:

bash: udev: command not found

docker-compose.yml

version: ‘2.1’
networks: {}
volumes:
resin-data: {}
services:
main:
build:
context: .
privileged: true
tty: true
restart: always
network_mode: host
volumes:
- ‘resin-data:/data’
labels:
io.resin.features.kernel-modules: ‘1’
io.resin.features.firmware: ‘1’
io.resin.features.dbus: ‘1’
io.resin.features.supervisor-api: ‘1’
io.resin.features.resin-api: ‘1’

os-release

PRETTY_NAME=“Debian GNU/Linux 9 (stretch)”
NAME=“Debian GNU/Linux”
VERSION_ID=“9”
VERSION=“9 (stretch)”
ID=debian
HOME_URL=“https://www.debian.org/
SUPPORT_URL=“https://www.debian.org/support
BUG_REPORT_URL=“https://bugs.debian.org/


#4

And here is the dockerfile…

FROM balenalib/raspberrypi3

RUN install_packages wget git
xorg xserver-xorg xserver-xorg-core
lsb-release libexif12
chromium-chromedriver
chromium-codecs-ffmpeg-extra
xserver-xorg-input-evdev xserver-xorg-input-kbd
xserver-xorg-video-fbdev x11-xserver-utils xinit
libgl1-mesa-dri chromium-browser xterm udev
matchbox-window-manager xautomation feh

ADD raspberry.png /etc/wallpaper.png

ENV UDEV=1

ADD run /bin/run

ENTRYPOINT [ “/bin/run” ]


#5

Hey Jay,

Thanks for that additional detail. Are there any other files besides the run executable? Would you be willing to provide this whole project in a GitHub or GitLab repository, so I can try to reproduce it on one of my Raspberry Pi devices?

Cheers,
Trevor Sullivan


#6

yep. send me your git account email address


#7

Did this get solved? Im trying to do similar and am having trouble with both getting chromium running and getting keyboards into wpe or iceweasel examples Ive found