May 19

Linux: Raspberry PI – Chromium didn’t shut down correctly – How to fix

When using Chromium as a Kiosk it will not shutdown properly on reboot.  As a result it throws an error every time it restarts.

Here is my fix(This assumes you are using pi as your auto login user):
1. mkdir /home/pi/scripts
2. nano /home/pi/scripts/chromiumcleanup
3. Add the following:
#!/bin/bash
/bin/sed -i ‘s/”exit_type”:”Crashed”/”exit_type”:”Normal”/’ ~/.config/chromium/Default/Preferences
4. ctrl X and Y
5. chmod 755  /home/pi/scripts/chromiumcleanup
6. crontab -e
7. Add the following: @reboot /home/pi/scripts/chromiumcleaner
Make certain to put a new line after the above.  crontab requires an empty line for an EOF.

Reboot and everything should work.

By: Timothy Jay Conrad  (sed command taken from S. Kemp)


Copyright 2021. All rights reserved.

Posted May 19, 2018 by Timothy Conrad in category "Linux

About the Author

If I were to describe myself with one word it would be, creative. I am interested in almost everything which keeps me rather busy. Here you will find some of my technical musings. Securely email me using - PGP: 4CB8 91EB 0C0A A530 3BE9 6D76 B076 96F1 6135 0A1B