chilipie-kiosk icon indicating copy to clipboard operation
chilipie-kiosk copied to clipboard

Chromium follows redirects and then stores wrong URL in session

Open unnu opened this issue 3 years ago • 2 comments

I'm not sure that this can be fixed by default, and maybe is a wanted behaviour for others. I open a webpage and understand, that it get's reloaded periodically. The page I open has a weired error management, because, when an server side error happens, it redirects to an error page. Chromium is then happily picking up that error page and displaying it instead of the page I wanted.

What I did is, that I added the URL of the page to the .xsession file when chromium is started. So the problem is solved every night, when the raspberry restarts.

What can I do to fix the problem shortly after it happens? let's say every five minutes. I somehow would need chromium to load a pre defined URL every 5 minutes instead of using the last URL that was in the location bar.

unnu avatar Apr 08 '21 19:04 unnu

Well, there's probably some correct way of doing this, but in the meanwhile, there's also the hacky way, which involves using xdotool to control Chromium. 🙂 You can find examples to get you started in the default crontab config.

jareware avatar Apr 23 '21 13:04 jareware

So I would basically do?

*/5 * * * * xdotool key ctrl+l && xdotool type "https://example.com/foo/bar" && xdotool key Return

unnu avatar Apr 23 '21 15:04 unnu