I've tried trawling through the RPI community threads for suggestions to start Chromium through a shell script.

I originally tried to do this with Crontab however because the cron user doesn't have the necessary environment variables I wanted to try with LXDE.

This thread is inaccurate for RPi4 as there is no lxsession in my .config folder in PI home


Here is an ls-la of .config:

drwx------ 17 pi pi 4096 Aug 19 17:43 chromium
drwx------  2 pi pi 4096 Jun 20 18:45 dconf
drwx------  2 pi pi 4096 Aug 16 15:02 gtk-2.0
drwx------  2 pi pi 4096 Aug 16 15:23 leafpad
drwx------  2 pi pi 4096 Aug 16 15:36 libfm
drwx------  3 pi pi 4096 Jun 20 18:20 lxpanel
-rw-r--r--  1 pi pi  164 Aug 16 14:58 lxtask.conf
drwx------  2 pi pi 4096 Jun 20 18:24 lxterminal
drwx------  3 pi pi 4096 Aug 16 15:02 pcmanfm
-rw-------  1 pi pi  633 Jun 20 18:20 user-dirs.dirs
-rw-r--r--  1 pi pi    5 Jun 20 18:20 user-dirs.locale

Debian version is:

PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION="10 (buster)"

So how can I get Chromium to autostart on boot?


2 Answers 2


Jonathan's answer was almost how I managed to do it on my Respberry Pi 4 (running Raspbian Buster), but with some small alterations (I would've commented under his answer if I could, but not enough rep).

In a terminal window:

  1. sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
  2. Then append the following to the end of the file and save:
    /usr/bin/chromium-browser --kiosk --ignore-certificate-errors --disable-restore-session-state https://www.google.com
  3. Reboot

Notes: the changes opposed to Jonathan's answer are: "chromium-browser" instead of just "chromium", and no apostrophes around the url. The "--kiosk" command (and the other commands) are optional ofcourse.

  • --ignore-certificate-errors has an error message on reboot otherwise perfect for my needs!
    – Eli Peters
    Oct 28, 2020 at 3:04


sudo nano /etc/xdg/lxsession/LXDE-pi/autostart && /usr/bin/chromium --kiosk --ignore-certificate-errors --disable-restore-session-state "https://www.google.com"

Close the file, and you're done!

EDIT: Reboot after you're done!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.