1

I'm trying to open chromium when the Raspberry Pi 3B+ boots. I've found this post, but my raspberry doesn't seem to have the /home/pi/.config/lxsession folder. enter image description here

I tried creating the autostart file but It it won't work:

sudo nano /home/pi/.config/lxsession/LXDE-pi/autostart

Any clues?

  • You can follow my answer – Ephemeral Jun 23 at 13:00
  • @Ephemeral It opens chromium, but it shows a message on the browser that says something like Unsupported command-line flag: –no-sandbox. If I follow your tutorial but I remove the no-sandbox flag it won't open. – Mikel Granero Jun 23 at 13:20
  • ExecStart : runuser -l pi -c chromium-browser ? – Ephemeral Jun 23 at 14:32
  • @Ephemeral Not working. How would be the full ExecStart= line? – Mikel Granero Jun 23 at 15:46
1

With System Unit file:

[Unit]
Description=Start Chromium
After=graphical.target
Wants=graphical.target

[Service]
User=pi
Group=pi
ExecStart=/bin/bash -c "export DISPLAY=:0; /usr/bin/chromium-browser https://raspberrypi.stackexchange.com 2>/tmp/startup-error-chromium;"

[Install]
WantedBy=graphical.target

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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