DEV Community

Cover image for Start Chromium in Kiosk Mode on Raspberry Pi OS
Kevin Lewis for Deepgram

Posted on • Originally published at developers.deepgram.com

4 2

Start Chromium in Kiosk Mode on Raspberry Pi OS

Earlier this month I built a wearable transcription device using Deepgram and a Raspberry Pi. The project is a web application running in a fullscreen browser on the Pi. However, when the device first starts, it requires a fiddly set of touchscreen interactions to get it in a ready state - opening the browser, navigating to the correct URL, and then fullscreening the browser. In this quick guide, I will show you the steps I took to automate this on device launch.

This tutorial works for Raspberry Pi OS 10 - Buster

Open your terminal and type the following:

sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
Enter fullscreen mode Exit fullscreen mode

This will open a new text file which will be executed when the desktop environment (LXDE) launches. In the file type the following:

@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi

@xset s off
@xset -dpms
@xset s noblank

@chromium-browser --kiosk https://deepgram.com
Enter fullscreen mode Exit fullscreen mode

Click Control + X to quit the app, and then Y to say 'yes' and save your file.

The first section sets up the environment and profile for the Pi, and the second section stops the Pi sleeping or starting the screensaver.

The final line is the most crucial - it starts Chromium (the built-in browser on which Google Chrome is based) in fullscreen mode at the specified URL. Kiosk mode also stops other user input outside of the browser - effectively locking the user into the browser.

I hope this helps you build web-based Raspberry Pi projects. If you have any questions, please feel free to reach out on Twitter - we're @DeepgramDevs.

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (0)

The Most Contextual AI Development Assistant

Pieces.app image

Our centralized storage agent works on-device, unifying various developer tools to proactively capture and enrich useful materials, streamline collaboration, and solve complex problems through a contextual understanding of your unique workflow.

👥 Ideal for solo developers, teams, and cross-company projects

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay