I am aware of post Disable Google Chrome session restore functionality and I have tried to apply most of I saw there without success. The nasty annoying popup lives. This is on a Raspberry pi
Can someone tell me why the following is not working.
the startup file on the pi is /etc/xdg/lxsession/LXDE-pi/autostart and it contains the following...
# fix chromium popup on hard reboot
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' ~/.config/chromium/Default/Preferences
sed -i 's/"exit_type":"Crashed"/"exit_type":"Normal"/' ~/.config/chromium/Default/Preferences
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' ~/.config/chromium/'Local State'
# chromium-browser
chromium-browser --start-fullscreen --kiosk --disable-session-crashed-bubble http://mydomain/?cat=SLOWTV
I have tried each sed line on the command line and it works editing the file. Is there a possibility they are failing silently when running at startup?
I have also tried also the following $HOME variable
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' $HOME/.config/chromium/Default/Preferences
sed -i 's/"exit_type":"Crashed"/"exit_type":"Normal"/' $HOME/.config/chromium/Default/Preferences
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' $HOME/.config/chromium/'Local State'
and the following using a hardcoded path
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' /home/pi/.config/chromium/Default/Preferences
sed -i 's/"exit_type":"Crashed"/"exit_type":"Normal"/' /home/pi/.config/chromium/Default/Preferences
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' /home/pi/.config/chromium/'Local State'
I have tried --incognito but I get another different chromium team stupid popup about allowing my site to write to disk, every single time, ( --incognito clears the cache)
I have tried
chmod -w ~/.config/chromium/'Local State'
chmod -w ~/.config/chromium/Default/Preferences
After running the sed and verifying the json variable are correct, but chromium has super power and it changes the access rights of these two files back to -rw------ from -r-------
No matter what I did, every time I hit the power switch, (bloody pi has no soft-reboot) and the pi reboots I get the popup
Restore page?
Chromium didn't shutdown correctly.
I have already wasted well over a day on this. This is becoming ridiculously painful. Thank you for any hint fixing my failures.