gkreidl
Posts: 6345
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Minimal Kiosk Browser

Thu Sep 03, 2015 7:24 am

Something like this, but ckeck the (full) path:
<iframe src="file:///homepage.html?cmd=omxplayer%20--win%20200,200,800,600%20/home/pi/media/video1.mp4"></iframe>
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

nlazovic
Posts: 18
Joined: Mon Aug 31, 2015 3:10 pm

Re: Minimal Kiosk Browser

Fri Sep 04, 2015 6:01 pm

nlazovic wrote:
gkreidl wrote:
nlazovic wrote: Hi,
this sounds very promising... 3-4 videos is good number. THANKS.
2 questions:
* currently javascript within a page created <video.../> element at certain point in time (e.g. t=15 sec). Does KWEB scan page on load to insert omxplayer or listens on DOM events or ... ?
* is there another approach to start "omxplayer --win" at location required by page (from js ?)
Yes, by setting the src of an iframe to a command link.
No, kweb itself doesn't scan the page for anything; it doesn't interfere with the DOM in any way.
I tried few options with no luck
Option 1
<div style="position: absolute; width: 600px; height: 400px; top: 200px; left: 200px;">
<iframe src="file:///homepage.html?cmd=omxplayergui.py%20--preset=nogui%20av%20media/video1.mp4"></iframe>
</div>

Option 2
<div style="position: absolute; width: 600px; height: 400px; top: 200px; left: 200px;">
<iframe src="file:///homepage.html?cmd=omxplayer%20--win%20media/video1.mp4"></iframe>
</div>

Option 3
<div style="position: absolute; width: 600px; height: 400px; top: 200px; left: 200px;">
<iframe src="file:///homepage.html?cmd=omxplayer%20--win%20200%20200%20800%20600%20media/video1.mp4"></iframe>
</div>

Any suggestions ?
problem solved. it was the fact that omxplayer require absolute file path, while we were passing in relative path.
thanks.

Pirathonite
Posts: 30
Joined: Tue Jun 23, 2015 4:39 am

Re: Minimal Kiosk Browser

Sat Sep 05, 2015 4:44 pm

gkreidl wrote:
Pirathonite wrote: dear gkreidl,

Yes, I am doing just that, but the game hangs when it loads a lesson. Also, if you could optimize in order for this game to run more smoother that would be great.]

Very thankful, thank you for your fast answer!

Thanks!
I cannot do anything about that. This is all done by the webkitgtk engine.
Perhaps you should try iceweasel. It has the fastest javascript engine of all Raspbian browsers.
But if the lagging is caused by animated graphics, it won't help much.
Well then, please, could you provide us with a newer version of this so called webkitgtk. I wouldnt know how to install it manually.

Thank you very much for you great work, great.

gkreidl
Posts: 6345
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Minimal Kiosk Browser

Sat Sep 05, 2015 6:20 pm

Pirathonite wrote: Well then, please, could you provide us with a newer version of this so called webkitgtk. I wouldnt know how to install it manually.

Thank you very much for you great work, great.
The webkitgtk3 library in current Raspbian is rather new and heavily modified by the Foundation's contractors. We'll get a slightly newer version with Jessie but they are still working on the modifications.
But I wouldn't expect many browser based games to work on the RPI.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

kohnout
Posts: 1
Joined: Fri Sep 18, 2015 7:47 pm

Re: Minimal Kiosk Browser

Sat Sep 19, 2015 6:58 pm

Dear gkreidl

could you please post prepared minimalistic image with your excelent browser starting in kiosk mode only? It should be based on minibian or other resource friendly distro without any desktop starting. It would be really helpful!

Thank you very much for your good job!

gkreidl
Posts: 6345
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Minimal Kiosk Browser

Sun Sep 20, 2015 5:04 am

kohnout wrote:Dear gkreidl

could you please post prepared minimalistic image with your excelent browser starting in kiosk mode only? It should be based on minibian or other resource friendly distro without any desktop starting. It would be really helpful!

Thank you very much for your good job!
I'm sorry, but that's beyond the scope of things I can (and want to) provide.

And there are already far too many different images available, IMHO.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

tjaap
Posts: 10
Joined: Sun Jul 21, 2013 10:14 am

Re: Minimal Kiosk Browser

Tue Sep 22, 2015 1:40 am

What I am trying to do, is load a webpage with a map and then do a few xdotools to zoom in. The loading of the map (http://www.buienradar.nl/panorama) works fine. But for the ./kiosk script to go on to do the xdotools, I need to add an ampersand to kweb line in my kiosk script, just like the documentation says. But if I do, the browser crashes immediately, with "connection to X server lost" as the only error.

Also, there is the "FATAL module g2d_23 not found" error, but that is there also when the browser stays up.

What am I doing wrong?

Thanks!

gkreidl
Posts: 6345
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Minimal Kiosk Browser

Tue Sep 22, 2015 5:16 am

tjaap wrote:What I am trying to do, is load a webpage with a map and then do a few xdotools to zoom in. The loading of the map (http://www.buienradar.nl/panorama) works fine. But for the ./kiosk script to go on to do the xdotools, I need to add an ampersand to kweb line in my kiosk script, just like the documentation says. But if I do, the browser crashes immediately, with "connection to X server lost" as the only error.

Also, there is the "FATAL module g2d_23 not found" error, but that is there also when the browser stays up.

What am I doing wrong?

Thanks!
That's not a crash at all; if the kiosk script finishes, the X-server is closed (and all programs running from X).

You need a different approach. Create a start page HTML file like this:

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="refresh" content="0;URL=http://www.buienradar.nl/panorama" />
</head>
<body>
<iframe src="file:///homepage.html?kbd=+" width="2px" height="2px" frameborder="0"></iframe>
<iframe src="file:///homepage.html?kbd=+" width="2px" height="2px" frameborder="0"></iframe>
<iframe src="file:///homepage.html?kbd=+" width="2px" height="2px" frameborder="0"></iframe>
<iframe src="file:///homepage.html?kbd=+" width="2px" height="2px" frameborder="0"></iframe>
<iframe src="file:///homepage.html?kbd=+" width="2px" height="2px" frameborder="0"></iframe>
<iframe src="file:///homepage.html?kbd=+" width="2px" height="2px" frameborder="0"></iframe>
</body></html>
This will load the map page after issuing a number of zoom by 10% commands (6 in this example).
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

Kildahl
Posts: 2
Joined: Tue Sep 22, 2015 10:06 am

Re: Minimal Kiosk Browser

Tue Sep 22, 2015 10:43 am

Hey
Nice work on Minimal Kiosk Browser!

I have a problem that i hope someone can help with.
I am trying to have html contents on top of a 1920x1080 video playing locally. I have try to use the html5 player playing the video and then place the html elements on top of it. It works somewhat fairly whit a color depth at 16 bit but i wood like to have the video and the html contents run i 24 or 32 bit color. When i run the browser at 24 or 32 color depth it gets laggy.

try 1) I've tried to get the HD video to play more fluently inside the html5 player but i'm not sure if that is possible on the raspberry pi 2.

try 2) I've also tried to make the omxplayer play the video and then tried to get the background of the browser transparent so the omxplayer takes care of playing the video and then have the browser on top of the video whit a see through background without success.

So my question is: Is there a way to make the browser background transparent so that the omxplayer can be seen through (try 2) or is there a way to play a local video in 1920x1080 24|32 bit color depth in html5 player (try 1).
I would much like to have try 2 working.

Hope you/someone can help :) Thanks..

gkreidl
Posts: 6345
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Minimal Kiosk Browser

Tue Sep 22, 2015 11:29 am

That's simply not possible.
You might have a look at Florians info-beamer (https://info-beamer.com/pi)
It should be able to display text and images on top of a running video (but no HTML content). It's not easy to use, though (needs some LUA programming).
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

tjaap
Posts: 10
Joined: Sun Jul 21, 2013 10:14 am

Re: Minimal Kiosk Browser

Tue Sep 22, 2015 1:17 pm

gkreidl wrote:That's not a crash at all; if the kiosk script finishes, the X-server is closed (and all programs running from X).
Of course! Thank you for the explanation. And also for kweb of course, it works better as a kiosk than Iceweasel, Epiphany and Chromium. This is what I made with it: https://twitter.com/tjaap/status/646274450590076928
gkreidl wrote:You need a different approach. Create a start page HTML file like this:
...
This will load the map page after issuing a number of zoom by 10% commands (6 in this example).
I can see how this is better, but the problem is that I need to do a mouseclick first (I suppose to give focus to the map itself in Javascript) and then the map catches + and - to zoom (this is how it works in other browsers). Should I be able to do this by calling a separate script with the xdotools in it?

Thank you again very much!

gkreidl
Posts: 6345
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Minimal Kiosk Browser

Tue Sep 22, 2015 1:35 pm

tjaap wrote: I can see how this is better, but the problem is that I need to do a mouseclick first (I suppose to give focus to the map itself in Javascript) and then the map catches + and - to zoom (this is how it works in other browsers). Should I be able to do this by calling a separate script with the xdotools in it?

Thank you again very much!
I don't understand why it needs a mouse click. It works for me with the redirection page.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

tjaap
Posts: 10
Joined: Sun Jul 21, 2013 10:14 am

Re: Minimal Kiosk Browser

Tue Sep 22, 2015 1:41 pm

gkreidl wrote:I don't understand why it needs a mouse click. It works for me with the redirection page.
Really? When I tried it, only the text became larger, so it did not zoom the map to a smaller region. But I will try again, thanks.

gkreidl
Posts: 6345
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Minimal Kiosk Browser

Tue Sep 22, 2015 1:44 pm

tjaap wrote:
gkreidl wrote:I don't understand why it needs a mouse click. It works for me with the redirection page.
Really? When I tried it, only the text became larger, so it did not zoom the map to a smaller region. But I will try again, thanks.
You must enable full zoom (Z option)!
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

tjaap
Posts: 10
Joined: Sun Jul 21, 2013 10:14 am

Re: Minimal Kiosk Browser

Wed Sep 23, 2015 10:09 am

gkreidl wrote:You must enable full zoom (Z option)!
Doesn't seem to solve it, but that's probably because the plus commands will be fired before the map is loaded. I am going to try to fix it by doing the meta refresh a couple of seconds later.

Otherwise the 'remote control' method is probably the best solution for me after all. I want the page to refresh every 10 minutes, maybe switch to a different website every 30 minutes. To have an automated presentation like that is easier to have in a script, correct?

One other thing: do you have a suggestion for prevent the monitor going into sleep mode? It is suspending after 15 minutes now, and the usual methods seem not to work while the kiosk is open.
Thanks!

gkreidl
Posts: 6345
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Minimal Kiosk Browser

Wed Sep 23, 2015 10:22 am

Yes, a script might be better in this case.

Add the following to your kiosk file to prevent screen blanking:

Code: Select all

xset s noblank
xset s off
xset -dpms
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

tjaap
Posts: 10
Joined: Sun Jul 21, 2013 10:14 am

Re: Minimal Kiosk Browser

Wed Sep 23, 2015 10:36 am

Thanks gkreidl!

fredfs
Posts: 58
Joined: Sun Jun 07, 2015 12:22 am

Re: Minimal Kiosk Browser

Sun Sep 27, 2015 1:40 am

I need to start kweb from command line into a url.

xinit ./ktop http://google.com

does not work.
kweb starts at default config page.

gkreidl
Posts: 6345
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Minimal Kiosk Browser

Sun Sep 27, 2015 7:33 am

fredfs wrote:I need to start kweb from command line into a url.

xinit ./ktop http://google.com

does not work.
kweb starts at default config page.
You must put the URL as second argument into the kweb start command. ktop is a kiosk script. There's a line in this script which starts kweb and which you have to modify

Code: Select all

kweb  -CZFD+-zbhrqfpoklgtjneduwxyavcsmi:#=?! http://google.com
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

PuppetHoundZ
Posts: 170
Joined: Wed Jan 21, 2015 2:57 am

Re: Minimal Kiosk Browser

Tue Sep 29, 2015 8:01 pm

Minimal Kiosk Browser ready for Raspbian Jessie release?

gkreidl
Posts: 6345
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Minimal Kiosk Browser

Tue Sep 29, 2015 9:13 pm

PuppetHoundZ wrote:Minimal Kiosk Browser ready for Raspbian Jessie release?
It might work without any problems. A version compiled for Jessie (with a few small changes) might follow next week. I need some time to upgrade my HD based systems to Jessie first.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

gkreidl
Posts: 6345
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

kweb and Jessie

Sun Oct 04, 2015 8:49 am

Good news first:
kweb, kweb3 and omxplayerGUI work well with Raspbian Jessie. You don't have to remove them before upgrading to Jessie. From the desktop everything will work as before.

After the upgrade, kweb will be using version 2.4.8 of the webkit1 library (used to be 1.8.1). There are no problems, but it won't use some of the new features. kweb3 uses the webkit3 library provided by the Foundation (for epiphany), which is still version 2.4.1.

Current version 1.6.8 will be the last Wheezy version. The next version, 1.6.9 will make use of some of the new features of the 2.4 libraries and therefore will not work any more on Wheezy.
To avoid updating to 1.6.9 on Wheezy with the built-in update scripts the update method will be changed a bit. This also means, that version 1.6.9 will have to be installed manually. For all following versions you can use the built-in update method again.

Now the bad news:
There are some problems on Jessie for users of kiosk applications:
Booting into kiosk applications as described in the manual, using xinit and a kiosk script and starting it from rc.local doesn't work any more, because it is executed too early and the network isn't up and running yet. You should remove or uncomment all things you've added to rc.local before upgrading to Jessie!
The Foundation is working on a solution for the late network start and perhaps it will work again then. But perhaps there are better solutions for systemd. I will have to study that first.

Kiosk application using the matchbox-window-manager work fine as before.
But I ran into a lot of troubles when using openbox as window manager. I don't think that this is a Jessie problem really but a result of all the modifications the Foundation added for their new UI. Somehow the openbox settings got terribly mangled on the way. Some things you might run into, when using a pure openbox environment:
All GTK-3 applications - and that includes kweb3 - have a black background and toggle buttons are not inverted any more. As long as you see this effect, nothing will really work any more. BTW, kweb crashes with an X-Windows error, when going to youtube.com (or other complex pages).
As I'm running my own small desktop using only openbox, tint2 and kweb with a special start page, nothing was really working for me after the upgrade. But the good news is, that all this can be solved. I start openbox with:
openbox --config-file ~/.config/openbox/lxde-rc.xml ...
and then used lxappearance and obconfig to create my own openbox environment. Don't use the PIX theme, but some of the others, and get rid of the fixed color scheme. After changing almost everything, the GTK-3 applications got their normal behavior again and from that moment on, the kweb crashes also disappeared!

I've noticed similar problems when using the awesome window manager.

There's one small thing with omxplayerGUI: if the menus pop up into the window area, they behave differently than when they pop down: You have to keep the mouse pressed and select a menu item before you let it go. Something strange from the new Python-TKinter version being installed with Jessie.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

pumpkinpi
Posts: 141
Joined: Fri Apr 18, 2014 7:11 pm

Re: Minimal Kiosk Browser

Mon Oct 05, 2015 3:10 am

New to kweb. Have it running well in kiosk mode.

I read through the manual and can't find the answer to this question. For my application I need to either:
1. Change the "blank space" right click menu that pops up to include a "Home" link.
OR
2. Show the back / home buttons on the screen somewhere.

#1 is my preferred route due to limited screen space. I really would like to keep it in full screen mode. I don't have a keyboard connected to it so I need some way of getting home via touch screen. I have the press and hold right-clicking working on the touch screen.

Thanks,
PPi.

gkreidl
Posts: 6345
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Minimal Kiosk Browser

Mon Oct 05, 2015 8:56 am

pumpkinpi wrote:New to kweb. Have it running well in kiosk mode.

I read through the manual and can't find the answer to this question. For my application I need to either:
1. Change the "blank space" right click menu that pops up to include a "Home" link.
OR
2. Show the back / home buttons on the screen somewhere.

#1 is my preferred route due to limited screen space. I really would like to keep it in full screen mode. I don't have a keyboard connected to it so I need some way of getting home via touch screen. I have the press and hold right-clicking working on the touch screen.

Thanks,
PPi.
2 is possible (for any keyboard command). Create a link (image, button) inside your html file, which points to:

Code: Select all

file:///homepage.html?kbd=h
The matching keyboard commands must be enabled, of course.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

pumpkinpi
Posts: 141
Joined: Fri Apr 18, 2014 7:11 pm

Re: Minimal Kiosk Browser

Mon Oct 05, 2015 11:03 am

I thought of creating links in my HTML since it was in the manual, HOWEVER, part of my application navigates to HTML pages that are not created by me so this is not easy to do. I am trying to return from these pages to the pages that I created via the interface some how.

I will try.

If you have other ideas, let me know.

PPi.

Return to “Raspberry Pi OS”