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.

1 Answer 1


Although, I created a user without sudo power The following should probably equally well on the default pi user.

After manually exiting Chromium on the GUI (ie. clean exit)

(note: super-user remain in current user path, now using relative to local path)
chattr  +i  .config/chromium/Default/Preferences
chattr  +i  .config/chromium/'Local State' 

If you never created a password for the root on your pi do the following and you will have the password for the su command above.

sudo passwd root

I have filed a bug against Chromium :D This is unnecessary pain and waste of internet and people time/energy and well being. :lol:

  • I used your solution but unfortunately all installed chrome extensions go when I restart the computer.
    – Sos.
    Jan 4, 2022 at 3:43
  • Salam, I did not install any extensions so I cannot speak to that. I noticed that gmail will silently log you out after it takes your password. I have to test whether the above is the cause of that. I like the fact I have not seen the popup since then though. I am waiting for an Android TV Box $39.99 to see how it works with my site. The Pi's have been a pain to say the least. Just today I noticed the latest chromium does not render some simple CSS. And I just did "sudo apt full-upgrade" same result. Also the sound/audio is OUT.
    – Meryan
    Jan 4, 2022 at 8:38
  • Best solution is installing another browser, Firefox is working without that annoying popup.
    – Sos.
    Jan 8, 2022 at 1:57
  • Thanks for the input about Firefox I will lookup the install command for it and try it out. Curious to see how it renders/supports CSS3 style (eg. flexbox flexgrid).
    – Meryan
    Jan 8, 2022 at 7:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .