Select the version of your OS from the tabs below. If you don't know the version you are using, run the command cat /etc/os-release
or cat /etc/issue
on the board.
Remember that you can always refer to the Torizon Documentation, there you can find a lot of relevant articles that might help you in the application development.
The Torizon kiosk-mode browser container runs a browser in kiosk-mode, allowing the implementation of web-based UIs for kiosk applications.
This container should be used together with the torizon/weston
container to provide a kiosk-mode user interface with a browser that opens an
URL passed as a parameter, does not show error messages/popups and does not allow the user to navigate to different websites.
The current implementation is based on chromium (using ozone/wayland rendering backend).
It is a full-screen mode where only the web page is displayed. The user cannot see the window, the top bar, refresh button, or anything else.
This article complies to the Typographic Conventions for Torizon Documentation.
First, start the wayland server container (torizon/weston
) as explained on Debian Containers for Torizon to provide the graphical environment for the browser window. Moreover, depending of how your application is designed, also start a container that provides the local UI that the kiosk browser will render.
The kiosk container needs visibility to some host resources (for accessing the accelerated graphical environment, buffer sharing and inter-process communication), and the URL of the web UI as a command line parameter. It also recognizes some optional command line flags (explained ahead).
Execution example of the kiosk mode browser (Wayland build, with hardware graphical acceleration):
# docker run -d --rm -v /tmp:/tmp -v /dev/dri:/dev/dri -v /var/run/dbus:/var/run/dbus \
--device-cgroup-rule='c 226:* rmw' --shm-size="256m" \
--security-opt="seccomp=unconfined" --name kiosk \
torizon/kiosk-mode-browser:$CT_TAG_KIOSK_MODE_BROWSER \
--virtual-keyboard https://www.toradex.com
Execution example of the kiosk mode browser (X11 build, without hardware graphical acceleration):
# docker run -d --ipc=host --rm -v /tmp:/tmp -v /dev/dri:/dev/dri -v /var/run/dbus:/var/run/dbus \
--device-cgroup-rule='c 226:* rmw' --shm-size="256m"
--security-opt="seccomp=unconfined" --name kiosk \
torizon/kiosk-mode-browser-x11:$CT_TAG_KIOSK_MODE_BROWSER_X11 \
--virtual-keyboard https://www.toradex.com
It's possible to start chromium in less-secure ways (secure from the point of view of user being able to run other graphical apps etc.) using command line switches.
--window-mode
: runs the browser inside a maximized window without navigation bar--browser-mode
: runs the browser in a standard window with navigation bars and all user menus enabled--virtual-keyboard
: enables a virtual keyboard for text entryDocker compose can be used to start multiple containers at the same time, providing shared data volumes, mount points, resource usage limitations etc. If you want to use the kiosk-mode-browser container in this way it's a good idea to make it dependent from the Wayland compositor container and the container providing the data that should be displayed by the UI.
You can find example Docker compose files in our sample repository: https://github.com/toradex/torizon-samples/tree/bullseye/debian-container/demonstration
The previously described command-line flags must be added to the command
parameter on the docker-compose file. See an example in the code snippet below:
docker-compose.ymlservices: kiosk: command: --virtual-keyboard --window-mode http://portainer:9000
The TorizonCore with Evaluation Containers image comes with the Kiosk container, since we run the Portainer container manager on top of it. You can read or edit the file on the board on /var/sota/storage/docker-compose/docker-compose.yml
for quick evaluation. To make persistent changes or deploy your own docker-compose.yml, we recommend using the TorizonCore Builder Tool.
In the article Using Multiple Containers with TorizonCore, we use the Kiosk container to display Grafana on a local UI. It allows us to explain, with a practical example, how to use multiple containers on Torizon.
Container that can be used to run a browser in kiosk-mode, allowing implementation of web-based UIs.
This container should be used together with the torizon/arm32v7-debian-weston:buster container to provide a kiosk-mode user interface with a browser that opens an URL passed as a parameter, does not show error messages/popups and does not allow the user to navigate to different websites.
Current implementation is based on chromium (using ozone/wayland rendering backend).
This article complies to the Typographic Conventions for Torizon Documentation.
You should start the wayland server container first (torizon/arm32v7-debian-weston:buster) and the container providing the local UI, if required. When you start the kiosk container you need to provide access to the /tmp folder (used for wayland and X11 sockets), /dev/dri (for buffer sharing/hardware acceleration) and provide the URL you want to open as command line parameter.
# docker run -d --rm -v /tmp:/tmp -v /dev/dri:/dev/dri -v /var/run/dbus:/var/run/dbus \
--device-cgroup-rule='c 226:* rmw' --shm-size="256m"
--security-opt="seccomp=unconfined" \
torizon/arm32v7-debian-kiosk-mode-browser https://www.toradex.com
Replace arm32v7 with arm64v8 for the 64-bit variant.
For the X11 build we have to provide shared memory access from the host system:
# docker run -d --ipc=host --rm -v /tmp:/tmp -v /dev/dri:/dev/dri -v /var/run/dbus:/var/run/dbus \
--device-cgroup-rule='c 226:* rmw' --shm-size="256m"
--security-opt="seccomp=unconfined" \
torizon/arm32v7-debian-kiosk-mode-browser https://www.toradex.com
It's possible to start chromium in less-secure ways (secure from the point of view of user being able to run other graphical apps etc.) using command line switches.
Docker compose can be used to start multiple containers at the same time, providing shared data volumes, mount points, resource usage limitations etc. If you want to use the kiosk-mode-browser container in this way it's a good idea to make it dependent from the Wayland compositor container and the container providing the data that should be displayed by the UI.
You can find example Docker compose files in our sample repository: https://github.com/toradex/torizon-samples/tree/master/debian-container/demonstration