Start Chromium in Kiosk Mode on Raspberry Pi OS


  1. Blog
  2. 2022
  3. 01
  4. Start Chromium in Kiosk Mode on Raspberry Pi OS
This post is effectively part 2 on building and publishing npm packages. If you haven't read the first post, you can do so here .

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

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

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.