OK, that fixed all of the modules I was having trouble with, but getting Chromium to work right wasn’t easy.

Chromium doesn’t like to be run as root (via startup script) you have to give it the flag:

--no-sandbox

Which doesn’t work, so instead you need to do this to run it as pi:

su pi -c 'chromium-browser --kiosk --noerrdialogs http://localhost:8080

To launch it without toolbars or a window (fullscreen), you have to give it the flag:

--kiosk

I tried the -app switch, and it removes the toolbars but leaves the window, so --kiosk is the way to go.

But this leaves an annoying warning about --no-sandbox not being supported, so you have to also add in:

--noerrdialogs

Chromium also does an annoying popup when the Pi is rebooted without properly closing Chromium: “Chromium was not shut down correctly”. (power cycle or sudo reboot in the terminal). So you can try to edit Chromium’s file before it launches to make it think it shut down OK:

sed -i 's/"exited_cleanly": false/"exited_cleanly": true/' ~/.config/chromium/Default/Preferences

Which doesn’t work because ~/ doesn’t work as expected when it’s a root-run startup script looking for a path in /home/pi/, so:

sed -i 's/"exited_cleanly": false/"exited_cleanly": true/' /home/pi/.config/chromium/Default/Preferences

Which didn’t work either, so I tried using some older documentation:

su pi -c 'chromium-browser --start-fullscreen --disable-session-crashed-bubble --disable-infobars http://localhost:8080

Which also didn’t work.

So… Then I realized I don’t really care about my browsing session data at all, so tried this:

su pi -c 'chromium-browser --kiosk --incognito http://localhost:8080

And that works, every time. Even when the Pi is power cycled.

Yikes.

So the complete launch command of “midori-start.sh” (now modified for Chromium) is:

#!/bin/sh unclutter & xset -dpms # disable DPMS (Energy Star) features. xset s off # disable screen saver xset s noblank # don’t blank the video device matchbox-window-manager & su pi -c 'chromium-browser --kiosk --incognito http://localhost:8080'

This also gets rid of the balloon telling me that “I can search here with Google”, pointing to where the address bar should be when Pi opens Chrome for the first time. It only happens once, but nice to clear that out as well.

The moral of the story here is: Don’t try to be fancy, just brute force the f@#$ing thing.