12 posts by MasseElch » Wed Sep 24, 2014 8:48 am Hey there, i tried to set up an pi to show a website where no interaction with the user is necessary. I just want to show it and refresh it once in a while. I start this script to boot directly into fullscreen midori:
The website contained some code to refresh every once in a while. Worked very well. Problem: Router does a every night restart and if the website isnt available code wont load and i got a 404 error and have to refresh it manually. Next idea:
So i tried to use the -i option for Midori. Refreshing works well too, but after every refresh the NavigationBar is shown. I found -e Navigationbar command at the manuals, but it does not seem to work for me. I then changed the config for midori and added the following line:
Midori just ignores this and shows the NavigationBar. Im now demotivated and do not know what to try next. Does anyone have suggestions? Regards, MasseElch
by gkreidl » Wed Sep 24, 2014 9:15 am You could use Minimal Kiosk Browser (kweb) and force a page reload with xdotool (sending "ALT+r" or only "r" keyboard command). If running in Kiosk mode kweb will never show its interface elements.
by MasseElch » Wed Sep 24, 2014 9:47 am Yeah, i already thought about changing the browser. But i need the browser to be capable of JavaScript. Especiallay i need ajax support for post/get request. Does your browser support that?
by gkreidl » Wed Sep 24, 2014 10:00 am Of course, but you have to enable it (command line argument in your case). Kweb uses the same engine as Midori, kweb3 the same as epiphany (since the latest upgrades it includes two versions).
by MasseElch » Wed Sep 24, 2014 10:46 am So i ran ./prepare, i do not need to watch youtube videos etc so i do not need to install those packages, do I? And i use matchbox window manager, i do not know if i need to install tint2?
by gkreidl » Wed Sep 24, 2014 11:45 am If you don't use web video youtube-dl is not required. And you don't need tint2 for your application (it doesn't work with matchbox window manager correctly anyway). For your kind of application I'd also use matchbox window manager. Did you know that you can hide the mouse cursor with matchbox-window-manager -use_cursor no ? Might be useful for your app.
by MasseElch » Wed Sep 24, 2014 12:02 pm Yep knew that, but for testing i need the cursor sometimes, thats why i used unclutter. If all is set up like i want it to go, i will hide it the way you suggested ![]()
by MasseElch » Wed Sep 24, 2014 12:25 pm How can i tell kweb to refresh after a delay of x seconds?
by gkreidl » Wed Sep 24, 2014 12:49 pm install xdotool. while true; do sleep 3600 xdotool key "r" done (in kiosk mode without the "A" option set, otherwise use 'xdotool key "alt+r"') I'd write a small script which checks, if the network is down and send the key only after a reconnection. Otherwise all the Javascript / Ajax stuff will have to be restarted each time you send a page reload command.
by MasseElch » Wed Sep 24, 2014 12:58 pm Yeah, you already said that, i remember now ![]() So the refresh will be on website and if connection got lost i do a refresh with xdotool. Thank you for the help so far
by gkreidl » Wed Sep 24, 2014 2:03 pm The following python script should do what you need. Put a call to it in your start script (kiosk file) before starting kweb:
by MasseElch » Thu Sep 25, 2014 2:23 pm Will do that. Thank you much ![]() |