4

I am currently trying to set up a Raspberry-Pi as a very light-weight/simple monitoring solution. All it has to do is open up a web-page on boot.

Opening the web-page was easy enough. I simply put a desktop file into ~/.config/autostart with a command like:

chromium-browser --kiosk http://192.168.1.23/monitor.html

So far so good. There are two problems however:

  1. I see a toolbar stating "This page is in German. Would you like to translate it?
  2. When I unplug the R-Pi and re-plug it I get the yellow "restore session" toolbar.

I cannot figure out a way to fix this. I tried with --temp-session hoping the "restore session" would go away. Unfortunately it did not :(

I also tried with --app which did not change a thing.

Any idea how to fix that? Note that I am not fixed on chromium. It just happens to be the one browser I found which makes it easy to launch in fullscreen with a URL in once simple command.

exhuma
  • 1,127
  • 1
  • 11
  • 24
  • How are you powering it down, just switching off the power? That might corrupt the filesystem, unless it's all read-only or entirely in ram. – Xen2050 Jan 26 '19 at 21:57
  • It's on a journaled FS so that shouldn't really be a problem. – exhuma Jan 27 '19 at 08:42

2 Answers2

9

You should be able to add the two flags --disable-translate and --incognito

chromium-browser --disable-translate --kiosk --incognito http://192.168.1.23/monitor.html

Incognito mode is a funny way to make Chromium not worry about the last session when it restores from a crash.

References: Disable Google Chrome session restore functionality

Chrome command line switches from a conversation on Stack Overflow

adamcodega
  • 106
  • 3
2

(putting this as answer because i cant comment)

As of chromium version 60.0.3112.89, --disable-translate doesn't work anymore.

The workaround, if you have access, is to remove the lang from html tag or set it to "en".

UPDATE:

As of version 69, the previous workaround doesn't work anymore, the solution is to add this tag to the html head: <meta name="google" content="notranslate">

  • Thanks for the input. I've upvoted you, and with luck you may comment now ;) Not sure how much is needed... – exhuma Jan 30 '18 at 09:51
  • @Pierre.Vriens Unfortunately not. The project I originally needed this for is no longer in production. – exhuma Jan 30 '18 at 10:21
  • Yeah, I can confirm that this is not working anymore with Chromium 71. – bk138 Jan 25 '19 at 15:35