All posts

Start Chromium in Kiosk Mode on Raspberry Pi OS

Kevin Lewis January 19, 2022 in Tutorials

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

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.

More with these tags:

Share your feedback

Thank you! Can you tell us what you liked about it? (Optional)

Thank you. What could we have done better? (Optional)

We may also want to contact you with updates or questions related to your feedback and our product. If don't mind, you can optionally leave your email address along with your comments.

Thank you!

We appreciate your response.