How to hide chrome warning after crash?

Solution 1:

You should run Chrome in Incognito Mode with this command:

chrome --incognito --kiosk http://127.0.0.1

Here they talk about running this command before starting Chrome to stop the Restore Bar from appearing:

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

Solution 2:

Based on @MiQUEL's answer to this duplicate question:

There are a few approaches.

Incognito mode (--incognito) helps, but it has several disadvantages, such as disabling the cache.

Passing --disable-infobars --disable-session-crashed-bubble works in some versions of Chrome, but, as of Chrome 58, it no longer works. (Removing the --disable-session-crashed-bubble was done as part of this issue; comments there suggest that the flag was intended to test the bubble feature and was not intended as an end-user feature to hide the Chrome warning).

The most reliable approach I've found is to manually edit Chrome's on-disk preferences. Here's how you do this on Linux. (Note that these instructions are for chromium-browser; Google Chrome itself uses ~/.config/google-chrome instead of ~/.config/chromium.)

sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' ~/.config/chromium/'Local State'
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/; s/"exit_type":"[^"]\+"/"exit_type":"Normal"/' ~/.config/chromium/Default/Preferences

Putting it all together with a couple of additional flags that have been helpful for kiosk mode in one Chrome version or another:

#!/bin/sh
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' ~/.config/chromium/'Local State'
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/; s/"exit_type":"[^"]\+"/"exit_type":"Normal"/' ~/.config/chromium/Default/Preferences
chromium-browser --kiosk --no-default-browser-check --no-first-run --disable-infobars --disable-session-crashed-bubble "http://some_url/"

Solution 3:

--disable-infobars --disable-session-crashed-bubble

while true; do
   chromium-browser --kiosk http://fotolia.com/ --no-first-run --touch-events=enabled --fast --fast-start --disable-popup-blocking --disable-infobars --disable-session-crashed-bubble --disable-tab-switcher --disable-translate --enable-low-res-tiling
   sleep 10s;
done