Skip to main content
Version: Torizon OS 7.x.y

Web Browser / Kiosk Mode with Torizon OS

Introduction

This article provides reference documentation for using the Chromium Web Browser on Torizon OS.

A common use case for the Chromium container is to easily deploy user-facing web applications built using frameworks such as Node, Angular, Ruby on Rails, React, and others.

Chromium runs inside a container on top of an existing Wayland session, using the Wayland Ozone implementation.

Browser and Weston

In Torizon OS, the recommended way to start a Wayland session is to use the provided Weston container.

The Torizon browser containers run a browser in kiosk-mode, allowing the implementation of web-based UIs for kiosk applications.

What is Kiosk-mode

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.

BSP and Reference Images

If you are looking for information on how to use web browser on Linux and/or how to use Yocto to build an embedded Linux image with web browser, refer to How to Use Web Browser (Linux).

Technical Details

iMX8-based SoCs

Chromium version 117.0.5938.132 is the currently supported release for iMX8-based SoCs, with patches from meta-imx.

GPU acceleration is supported via WebGL1 and WebGL 2.

Video decoding is supported via V4L2.

AM62-based SoCs

Chromium version 123.0.6312.122 is the currently supported release for AM62-based SoCs.

GPU acceleration is supported via WebGL1 and WebGL2.

Running Chromium

info

Before running Chromium, you must first start a Wayland/Weston container to initialize the graphical backend.

The following command will launch the browser with the default options and open the WWW CERN Project page.

# docker run -d --name=chromium \
-v /tmp:/tmp -v /var/run/dbus:/var/run/dbus \
-v /dev:/dev --device-cgroup-rule="c 199:* rmw" \
--device-cgroup-rule="c 81:* rmw" --device-cgroup-rule="c 234:* rmw" \
--device-cgroup-rule="c 253:* rmw" --device-cgroup-rule="c 226:* rmw" \
--device-cgroup-rule="c 235:* rmw" \
--security-opt seccomp=unconfined --shm-size 256mb \
torizon/chromium-imx8:4 \
--virtual-keyboard http://info.cern.ch/hypertext/WWW/TheProject.html

Optional command line flags

There are four optional convenience flags when starting the Chromium container.

Two of these flags are purely for backwards compatibility with Torizon OS 6:

  1. --window-mode: launches Chromium with --start-maximized --app=
  2. --browser-mode: launches Chromium with --start-maximized

These are not recommended for use in new deployments.

The other two flags are:

  1. --virtual-keyboard: adds a virtual keyboard from a local extension. Functionality of this extension has not been tested in Torizon OS 7.
  2. --dry-run: instead of launching Chromium, it just echoes the final command line. This is used for testing.

It's possible to pass arbitrary switches to Chromium by issuing them in any order, together with the known start-up flags. Note that there isn't an official list of switches, neither maintained by Toradex nor by the Chromium team. Users may refer (and test) to an unofficial but widely used list.

Moreover, the positional argument - after all flags - is a URL that defaults to www.toradex.com.

Note on Performance

It's highly recommended to not take project decisions with performance baselines taken from WebGL benchmarks or similar. Using such a high-level application to render applications implies more layers of abstraction from the hardware, which may not achieve the same performance of a highly-tuned native graphical application, for example.

Thus, we highly recommend customers to run trials on Chromium with minimal applications of their framework of choosing before commiting to this particular stack.

Send Feedback!