xgrewellx
Posts: 5
Joined: Thu Sep 12, 2013 6:10 pm

Re: Minimal Kiosk Browser

Mon Sep 30, 2013 8:50 pm

You are the man! or woman! haha

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

Re: Minimal Kiosk Browser

Wed Oct 02, 2013 1:24 pm

New version 1.1 available!

I've modified the first posting accordingly. There is now also a real manual available; it's part of the archive, but can also be downloaded separately.

Changelog for version 1.1
  • Two more toolbar icons: “Reload page” and “Enable/Disable Cookies”
    Tooltips on all toolbar icons
    Icon labels are now visible when started from Raspbian desktop
    Different handling of videos embedded in web pages; it now supports all websites that can be accessed by youtube-dl (and not only youtube); it does not reload the page any more.
    Command line now supports up to two arguments (options string and URL)
    More options and keyboard commands:
    • interface options for the toolbar (icons and icon size, labels)
      two different characters for switching Javascript or Cookie support on and off, instead of toggling them.
    Support for calling programs (defined in kwebhelper_settings) as root (sudo) without opening a terminal
    Separate settings file for kwebhelper.py, that can be edited at runtime (changing the settings does not require a new install any more)
    Added homepagecreator.py script to create a homepage.html file with example configuration text files (in separate compressed tools folder)
    Readme file has been replaced by a manual in PDF format
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

vincentjanv
Posts: 12
Joined: Sun Oct 28, 2012 11:26 am

Re: Minimal Kiosk Browser

Thu Oct 03, 2013 8:35 am

Great script! But with the latest version, I only receive a white page, with a cursor in the middle. I used your sample code

kweb ­kadp+­bhrzyjkewcf http://www.google.be


But still the same.. Internet connection is working... Ideas?

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

Re: Minimal Kiosk Browser

Thu Oct 03, 2013 9:36 am

You're right, I just tested it. It only happens in kiosk mode, all other options work.

Something I did not test, obviously. I'll check the code to find a solution.

Thanks for the notification.

Guenter
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: 5953
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Minimal Kiosk Browser

Thu Oct 03, 2013 10:09 am

I found the bug and uploaded a new package.

Important notice to the (about 25) people who already downloaded the package since yesterday: I have not changed the version number, just updated the package with the same name. Please download it again.
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

vincentjanv
Posts: 12
Joined: Sun Oct 28, 2012 11:26 am

Re: Minimal Kiosk Browser

Thu Oct 03, 2013 10:59 am

Great, thanks.

Another question: I'll use this for a digital signage solutions.. Basicly html pages automaticly rotating... For video playback, i would like to use mxplayer or VLC which works with your script, but... is it possible to get a callback or something when the playback has finished? So i can start a video, switches to mxplayer; it closes and comes back to the page, and then an event fires so I can continue to the next page;.. Any ideas? That would be awesome!

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

Re: Minimal Kiosk Browser

Thu Oct 03, 2013 11:32 am

vincentjanv wrote:Great, thanks.

Another question: I'll use this for a digital signage solutions.. Basicly html pages automaticly rotating... For video playback, i would like to use mxplayer or VLC which works with your script, but... is it possible to get a callback or something when the playback has finished? So i can start a video, switches to mxplayer; it closes and comes back to the page, and then an event fires so I can continue to the next page;.. Any ideas? That would be awesome!
If you know the length of the video in advance, you can use an empty (black) HTML page containing an iframe whose src is the video link (can be a file:///.. link) and a refresh (redirect) in the header timed according to the video length. Otherwise you need to work with Javascript and PHP or Python running on a web server. The Javascript calls a PHP or Python function every 2 seconds (AJAX), for example, which in turn checks if omxplayer is still running. If it is finished, the Javascript function will load the next page. Maybe this will also work without a server, if you call a CGI script with a file:///-link from your Javascript code.
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

vincentjanv
Posts: 12
Joined: Sun Oct 28, 2012 11:26 am

Re: Minimal Kiosk Browser

Thu Oct 03, 2013 11:51 am

Thanks for your response! Unfortunately, using an iframe doesnt work it seems. Using this url for instance (has an iframe) it plays on my pc, but on my Rpi I only see white screen... Although mxplayer can play it without a problem:(

http://www.digitalscreen.be/player/type ... &lengte=21

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

Re: Minimal Kiosk Browser

Thu Oct 03, 2013 12:17 pm

I tested it myself. Someone else already asked me this. Here is the example page (without refresh, replace the file link with some movie on your file system):

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
<style>
body { background-color: rgb(0,0,0);}
</style>
</head><body>
<iframe src="file:///media/Volume/temp/trailer_400p.ogg" frameborder="0"></iframe> 
</body></html>
If you open this page, the movie will be started immediately. You only have to add the meta refresh tag to go to the next url afterwards.
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: 5953
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Minimal Kiosk Browser

Thu Oct 03, 2013 12:37 pm

It does not work with your video link. I suppose, omxplayer cannot open https links. Try it with a simple http link. I've just tested it with a link to a media server running on my network.
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

vincentjanv
Posts: 12
Joined: Sun Oct 28, 2012 11:26 am

Re: Minimal Kiosk Browser

Thu Oct 03, 2013 12:47 pm

i just get a black page aaargh:( no mather where I put the file (and adjust the location of course..)

It's strange cause it plays the file using omxplayer directly:o

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

Re: Minimal Kiosk Browser

Thu Oct 03, 2013 2:21 pm

Strange! I even downloaded your html page, replaced the video link (with another http address on my local network), deleted the javascript stuff - and it works here.

Did you test it with a local file link? Create a simple web page with a link to the video file or stream. Does it play when you click the link?

Which version of omxplayer are you using?
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

vincentjanv
Posts: 12
Joined: Sun Oct 28, 2012 11:26 am

Re: Minimal Kiosk Browser

Thu Oct 03, 2013 2:56 pm

Below you can find my version info..

I tried it both locally and with network files..

It does find the file, cause when I change it to something unexcisting, it gives me the not-found error of chromium (or could not open..) So it seems to open it, but just shows black...

Code: Select all

Package: omxplayer
Versions:
0.2.6~git20130427~fcfb7911 (/var/lib/apt/lists/archive.raspberrypi.org_debian_dists_wheezy_main_binary-armhf_Packages) (/var/lib/dpkg/status)
 Description Language:
                 File: /var/lib/apt/lists/archive.raspberrypi.org_debian_dists_wheezy_main_binary-armhf_Packages
                  MD5: f2c1990ed528d0a0c203fc620600b4b8


Reverse Depends:
Dependencies:
0.2.6~git20130427~fcfb7911 - libpcre3 (0 (null)) libfreetype6 (0 (null)) fonts-freefont-ttf (0 (null)) fbset (0 (null)) x11-xserver-utils (0 (null)) grep (0 (null))
Provides:
0.2.6~git20130427~fcfb7911 -
Reverse Provides:

jugganaut
Posts: 1
Joined: Thu Oct 03, 2013 5:11 pm

Re: Minimal Kiosk Browser

Thu Oct 03, 2013 5:18 pm

Hi,

I've installed the Minimal Kiosk Browser, have the RPi logging in automatically, launching the browser in Kiosk mode (have installed matchbox) and it launches a page for me. All this is working great, except I have a problem with screen blanking that I cannot seem to shake. I've edited /etc/kbd/config and that seems to keep the screen on at the prompt, until I launch kiosk mode and it goes blank after about 15 minutes I'm guessing. So are there some settings in matchbox? I've searched and cannot find anything on it.

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

Re: Minimal Kiosk Browser

Fri Oct 04, 2013 7:15 am

jugganaut wrote:Hi,

I've installed the Minimal Kiosk Browser, have the RPi logging in automatically, launching the browser in Kiosk mode (have installed matchbox) and it launches a page for me. All this is working great, except I have a problem with screen blanking that I cannot seem to shake. I've edited /etc/kbd/config and that seems to keep the screen on at the prompt, until I launch kiosk mode and it goes blank after about 15 minutes I'm guessing. So are there some settings in matchbox? I've searched and cannot find anything on it.
This is not a matchbox, but X-setting. I don't mind, so I've never changed that. But I've seen threads about that here, Search the forum.
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

vincentjanv
Posts: 12
Joined: Sun Oct 28, 2012 11:26 am

Re: Minimal Kiosk Browser

Fri Oct 04, 2013 11:50 am

Yeah, I'm also struggeling with the screensaver, the X-settings don't seem to work for some reason..


Anyway,found out why my video wasn't playing, i had to install xterm first and afterwards it played smoothly.. Apparantly it isn't installed per default with raspbian...

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

Re: Minimal Kiosk Browser

Fri Oct 04, 2013 3:39 pm

vincentjanv wrote:Anyway,found out why my video wasn't playing, i had to install xterm first and afterwards it played smoothly.. Apparantly it isn't installed per default with raspbian...
But it should be! (and was in the past). That's why we used it to start omxplayer from ... a terminal is needed to get the focus for the keyboard controls.
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

vincentjanv
Posts: 12
Joined: Sun Oct 28, 2012 11:26 am

Re: Minimal Kiosk Browser

Sat Oct 05, 2013 9:57 am

Do you think you can 'increase' the localStorage size? I cannot even set 1 object, in a try /catch i get this error: QUOTA_EXCEEDED_ERR: DOM Exception 22

What's the base for the webbrowser?


Almost there ^^

Edit:
Could you perhaps try to build a version with the enable-private-browsing flash to false instead of true, in kweb.c? I tried to compile it myself but failed miserably... That should enable local storage normally
Last edited by vincentjanv on Sat Oct 05, 2013 10:23 am, edited 1 time in total.

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

Re: Minimal Kiosk Browser

Sat Oct 05, 2013 10:22 am

vincentjanv wrote:Do you think you can 'increase' the localStorage size? I cannot even set 1 object, in a try /catch i get this error: QUOTA_EXCEEDED_ERR: DOM Exception 22

What's the base for the webbrowser?

Almost there ^^
The base is webkit, the same library as used in Midora, for example. Can you send send me an example page, where this error occurs? I'm using the browser for about 8 months now and never got that error. Contact me via PM.
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

vincentjanv
Posts: 12
Joined: Sun Oct 28, 2012 11:26 am

Re: Minimal Kiosk Browser

Sat Oct 05, 2013 10:45 am

Sent you a pm..

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

Re: Minimal Kiosk Browser

Wed Oct 16, 2013 1:22 pm

Announcing version 1.2

Before I'll go into any details, I want to make clear the two different purposes I had in mind when creating Minimal Kiosk Browser:
1) A slim, efficient and fast universal browser built upon a modern engine (webkit) with support for all kinds of media (video, audio, playlists) and PDF files, which can be used from the desktop or the command line (with an "xinit ./kiosk" command).
2) A browser front end for embedded applications like a media player, a signage or presentation system or lots more. Kiosk mode and the application interface via command links are special features for such purposes.

The new version 1.2 has enhancements in both areas:

I've included an extractor for videos embedded into HTML5 tags. Usually libwebkit will try to play such videos, but far too slow. Clicking on the "Play" icon will now extract the video source links and play the video(s) full screen with omxplayer.

I've also enabled the"spacial navigation" feature of webkit, which provides fast navigation through form elements or links with the arrow keys. In embedded applications this can be used to control the browser content with an ir remote control (which has to issue key strokes). To make that visible on links, the focus style has to be set.

There are four new command line options:

'x' - use argument 2 as your homepage (bound to the "home" button). This can be a file:// or http:// link. If you create a script (or kiosk) file, that contains
kweb -x http://myhomepagelink
the browser will open that page when it starts and always return to it, when you click the "home" button. The command links won't work, if you connect to a server, because they can only be used from file links (but see below).

'z' - disable private browsing (which is by default enabled in Minimal Kiosk Browser)

The last two options are very special ones, only to be used in kiosk mode:

'n' - kweb can be used without a window manager; screen size is hard coded to 1920x1080 then. Not all options work as expected (keyboard control of omxplayer, for example), so this is only useful for special applications.

'l' - use the command links from a server running on localhost (only usefull in combination with the x option). For example
kweb -k...xl http://localhost:8080/
will use this link as homepage and support command links of the form '<a href=http://localhost:8080/homepage.html?cmd=top" (to run the top command inside a terminal). This is risky from a security aspect and is only recommended for very special embedded applications.

I'm distributing a few beta versions by email now, while I'm updating the manual. Contact me via PM, if you are interested. The final version should be published in about a week.
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

sportsnapper
Posts: 69
Joined: Wed Sep 05, 2012 11:27 am

Re: Minimal Kiosk Browser

Wed Oct 16, 2013 3:52 pm

Just trying this, as I have a need for a good Kiosk browser, and my first go it was great. I ran kweb under my normal Pi desktop, and it's fine, and goes to fullk screen.

I've just tried to start it using the kiosk example file, but with these option, and I get a small browser window the top left of the screen and nothing full screen

Code: Select all

#!/bin/sh
matchbox-window-manager &
#kweb -pdf
kweb -kcf http://192.168.9.101/myurl

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

Re: Minimal Kiosk Browser

Wed Oct 16, 2013 4:55 pm

sportsnapper wrote:Just trying this, as I have a need for a good Kiosk browser, and my first go it was great. I ran kweb under my normal Pi desktop, and it's fine, and goes to fullk screen.

I've just tried to start it using the kiosk example file, but with these option, and I get a small browser window the top left of the screen and nothing full screen

Code: Select all

#!/bin/sh
matchbox-window-manager &
#kweb -pdf
kweb -kcf http://192.168.9.101/myurl
Did you install matchbox-window-manager? It's not part of Raspbian default installation.
sudo apt-get install matchbox-window-manager

or try it with:
openbox &
instead

You must click once with the mouse before you can see anything (strange problem with openbox).
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

sportsnapper
Posts: 69
Joined: Wed Sep 05, 2012 11:27 am

Re: Minimal Kiosk Browser

Wed Oct 16, 2013 5:20 pm

Ahh, thanks.

I've installed nmatchbox and it works fine now. And re-read the documentation - which I did skim a bit, and it clearly says you need to install it. Perhaps add a line break so it looks like

Code: Select all

For this solution you will have to install matchbox-windows-manager. 

Copy the file “kiosk” from the examples folder
to the root of your user directory or create your own one (and make it executable). It may look like this:
It would stand out for those of us who hurry through the doc in order to get to the good part - trying it out....

Thanks again...looking forward to using this at the weekend as a kiosk solution...

hustlerinc
Posts: 16
Joined: Sat Oct 12, 2013 8:51 am

Re: Minimal Kiosk Browser

Sun Oct 20, 2013 7:30 pm

This is a noob question, but how do I download and install the latest version of this browser from the terminal in default raspbian wheezy?

Return to “Raspbian”