How can I disable the "Chromium didn’t shut down correctly" message when my browser opens?
Solution 1
Much easier solution, start Chromium with the --disable-infobars flag. I tried all of the above before finding it, and it does exactly what I wanted. You can leave all of the other stuff alone.
My specific command line is:
/usr/bin/chromium-browser --start-fullscreen --disable-session-crashed-bubble --disable-infobars http://www.example.com
Solution 2
Also, apparently running in incognito mode by default will also prevent the error because nothing is saved from the session against which to check for a crash.
example: chromium-browser --kiosk --start-maximized --incognito kiosk.html
Solution 3
This finally worked for me, and it's pretty simple:
- Shut down Chromium gracefully
- Change the "Change content" permissions of ~/.config/chromium/Default/Preferences to "Nobody"
That will lock the state of two variables, regardless of how Chromium was shut down:
- "exit_type": "Normal"
- "exited_cleanly": true
Of course, only do that after you're done setting preferences
Solution 4
Solution/Hack in 5 seconds (https://askubuntu.com/a/720855) Settings->Advanced Settings->System-> uncheck Continue running background apps when Chrome is closed
(read the whole thread for hints on why the issue happens. Makes a lot of sense)
Solution 5
Just use incognito mode:
chromium-browser --incognito http://www.example.com
Related videos on Youtube
Doktor J
Updated on September 18, 2022Comments
-
Doktor J almost 2 years
I am running Chromium 39 on Ubuntu 14.04, on a single-board computer (ODROID U3, though I believe the question is applicable to Chromium on any Ubuntu system and possibly other Linux distros as well).
The computer is being used with Chromium in kiosk mode to power a large wall display; however, if the system loses power, when Chromium restarts it has the big nag bar complaining that "Chromium didn't shut down correctly". Since the system is designed to be automated, and we intend to run multiple systems, manually remoting into the machine (or worse, running around connecting and disconnecting a USB mouse) is not an acceptable solution.
How can I prevent Chromium from popping up this warning if it gets shut down improperly?
-
Doktor J over 9 yearsPlease note that I rewrote the script from memory (with the help of notes reminding me where the files were located); if anyone spots any glaring syntax errors or the like please feel free to edit or point it out in comments.
-
user420603 about 9 yearsI don't appear to have the randomly-named files, but otherwise this helped me.
-
user420603 almost 9 yearsThis doesn't seem to work any more; I'm still (occasionally) getting the "Restore pages?" warning. Any ideas?
-
Dan McDougall over 8 yearsThanks for posting this. Works great with the
--kiosk
switch. -
DavidPostill about 8 yearsPlease quote the essential parts of the answer from the reference link(s), as the answer can become invalid if the linked page(s) change.
-
Plazgoth over 7 yearsThank you . This is a much simpler solution and worked for my case.
-
emc over 7 yearsI don't think
--start-fullscreen
is needed when using--kiosk
. -
Doktor J over 7 years@RogerLipscombe if you're still having this problem, see Steve's answer above (which I've marked as accepted because it seems to do the trick on my test unit). Hope it helps!
-
Davide Andrea almost 7 years--incognito does work, but it kills cookies, which (in my case) are required
-
Davide Andrea almost 7 yearsThanks for catching that. I had posted it in the wrong place. I cut it from there, copied here. Fixed.
-
Davide Andrea almost 7 yearsYes, I wrote it. I wrote in the wrong browser tab (different question). When I noticed, I cut it from there (so the original no longer exists) and I pasted it in the tab with this question, the correct place. I am really sorry for having caused all this confusion, and I thank you for catching my pasting mistake.
-
Scott - Слава Україні almost 7 yearsOK, then, you're fine.
-
DavidPostill almost 7 yearsPlease do not post the same answer to multiple questions. If the same information really answers both questions, then one question (usually the newer one) should be closed as a duplicate of the other. You can indicate this by voting to close it as a duplicate or, if you don't have enough reputation for that, raise a flag to indicate that it's a duplicate. Otherwise tailor your answer to this question and don't just paste the same answer in multiple places.
-
Nate Dudek over 6 yearsThis worked well for me. I could not get the above --disable-infobars or --disable-session-crashed solution above to work for me.
-
B Robster about 6 years--disable-session-crashed-bubble isn't operational as of some point around Chrome 58... feel free to add your two bits to bugs.chromium.org/p/chromium/issues/detail?id=445256#c17 (which seems to be still be under consideration) to let the Chromium team know that this matters and hopefully have this functionality added back in...
-
bertieb almost 6 years@Toto how is this a link only answer? I mean, it could use an explanation, but the URL is there as an example.
-
Toto almost 6 years@bertieb: Without explanation I consider this as a link only because the only thing I see is a link, but after reread it, it seems a very low quality post. I just keep the last part of my comment: Can you elaborate on this a little more?
-
Jose Varghese over 4 yearsThis is a great post - the only one which worked for me.