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

Re: Minimal Kiosk Browser

Fri Apr 17, 2015 1:32 pm

SirPali wrote:We've been using the Kweb browser for a while on a few of our kiosk terminals now and haven't really run into large issues lately.
However, we've noticed the browser crashing after running more than 24 hours. In this case the entire browser is closed.
We haven't pinpointed the exact moment of crashing yet, but on multiple occasions we left the office with the browser running on our kiosk terminal, and arrived in the morning with the desktop showing and the browser closed.

We've 'fixed' this by letting our Pi's reboot at night, but is this crashing a known issue? And if so, is there is anything we can do to prevent it? We're showing a page of products on our kiosk terminals, that refreshes to show new products every 10 seconds using Javascript.
I've get one similar report but I think it was suing kweb3. Which one do you use? I need more information about your application. You could send me a PM and then we can use email.
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

qe548
Posts: 3
Joined: Wed Apr 15, 2015 6:20 am

Re: Minimal Kiosk Browser

Fri Apr 17, 2015 6:59 pm

gkreidl wrote:
qe548 wrote:Many thanks for an excellent browser.

Will Kweb - on a raspberry pi - work with the following python module ?

https://docs.python.org/2.7/library/webbrowser.html

The command of greatest interest is:

webbrowser.open(url, new=0, autoraise=True)

i.e. to open a webpage in an EXISTING browser window, from a python script.
It opens a new browser instance.
But there are other ways. You could use xdotool, but this only works completely if you use matchbox window manager.
Thankyou for the clear response.

As suggested have installed xdotool and matchbox, created a .xsession file in home/user as suggested in the manual:

#!/bin/sh
matchbox­window­manager &
kweb ­KHCUA+­zbhrqfpoklgtjneduwxy file:///usr/local/share/kweb/kweb_about_a.html

That works marvellously well.

I would like to be able to run a python script which will direct kweb according to GPIO UART input that it has received, sending commands of the form:

subprocess.call(["xdotool", "key", "alt+i", "type", "http://www.google.com"])

So far no luck.

Two questions:

1) In order to launch the python script in the same environment as matchbox and kweb, should I launch it from the .xsession script above?

2) How can I then, during development, modify the python script and re-launch it for testing without rebooting the computer? Would it be possible to make the .xsession script something like:

#!/bin/sh
matchbox­window­manager &
kweb ­KHCUA+­zbhrqfpoklgtjneduwxy file:///usr/local/share/kweb/kweb_about_a.html
while true; do
python /home/user/test.py;
sleep 1s;
done

When the kiosk is then running, to save a new version of the file "test.py" (by SSHFS), kill the test.py process and then have it re-launch automatically from the .xsession script under the matchbox windowmanager?

My script doesn't work & can find very little information with google.

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

Re: Minimal Kiosk Browser

Fri Apr 17, 2015 8:41 pm

qe548 wrote:Thankyou for the clear response.

As suggested have installed xdotool and matchbox, created a .xsession file in home/user as suggested in the manual:

#!/bin/sh
matchbox­window­manager &
kweb ­KHCUA+­zbhrqfpoklgtjneduwxy file:///usr/local/share/kweb/kweb_about_a.html

That works marvellously well.

I would like to be able to run a python script which will direct kweb according to GPIO UART input that it has received, sending commands of the form:

subprocess.call(["xdotool", "key", "alt+i", "type", "http://www.google.com"])

So far no luck.

Two questions:

1) In order to launch the python script in the same environment as matchbox and kweb, should I launch it from the .xsession script above?

2) How can I then, during development, modify the python script and re-launch it for testing without rebooting the computer? Would it be possible to make the .xsession script something like:

#!/bin/sh
matchbox­window­manager &
kweb ­KHCUA+­zbhrqfpoklgtjneduwxy file:///usr/local/share/kweb/kweb_about_a.html
while true; do
python /home/user/test.py;
sleep 1s;
done

When the kiosk is then running, to save a new version of the file "test.py" (by SSHFS), kill the test.py process and then have it re-launch automatically from the .xsession script under the matchbox windowmanager?

My script doesn't work & can find very little information with google.
The subprocess xdotool call is missing a newline at the end. Try:
subprocess.call(["xdotool", "key", "alt+i", "type", "http://www.google.com\n"])

If you want to run the script above for development, add " &" to the kweb line.
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

User avatar
robbieone
Posts: 12
Joined: Thu Apr 16, 2015 10:59 pm
Location: France

Re: Minimal Kiosk Browser

Sat Apr 18, 2015 11:51 am

Well I cannot provide that much details. I run a photo slideshow with some text animations.

Testing with Epiphany Fullscreen it run smoothly, using kweb it's the same as long I don't enable Kiosk mode,
after it's about 2 frames / secondes. I use 512mo for the Buffer in raspi-config.

Webkit use hardware acceleration for CSS animation in desktop I was thinking it was the same in the Raspberry !?
Many Raspberries 2, still not enough !

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

Re: Minimal Kiosk Browser

Sat Apr 18, 2015 12:55 pm

robbieone wrote:Well I cannot provide that much details. I run a photo slideshow with some text animations.

Testing with Epiphany Fullscreen it run smoothly, using kweb it's the same as long I don't enable Kiosk mode,
after it's about 2 frames / secondes. I use 512mo for the Buffer in raspi-config.

Webkit use hardware acceleration for CSS animation in desktop I was thinking it was the same in the Raspberry !?
Without any example I cannot say much. If you mean 512 MB GPU memory this is far too much. You are taking valuable RAM from the processor. 128 MB is enough.
Do you use kweb or kweb3?
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

User avatar
robbieone
Posts: 12
Joined: Thu Apr 16, 2015 10:59 pm
Location: France

Re: Minimal Kiosk Browser

Sat Apr 18, 2015 4:38 pm

Shame on me but hourray !
I just use Kweb instead of Kweb3 on the console ... noobs mistake
Sorry for your time.
Many Raspberries 2, still not enough !

michaelfranz
Posts: 50
Joined: Mon Mar 30, 2015 10:40 am

Re: Minimal Kiosk Browser

Sun Apr 19, 2015 1:24 pm

Hi.

Just tried to install on a fresh raspbian installation with the following lines:
wget http://steinerdatenbank.de/software/kweb-1.6.4.tar.gz
tar -xzf kweb-1.6.4.tar.gz
cd kweb-1.6.4
./debinstall

But get an error as you can see on this image: http://michaelfranz.dk/IMG_2166.JPG

Is something down ?

Also the debinstall runs preparekweb after install which should just be prepare.

Cheers
Michael Franz

User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: Minimal Kiosk Browser

Sun Apr 19, 2015 2:53 pm

michaelfranz wrote:Hi.

Just tried to install on a fresh raspbian installation with the following lines:
wget http://steinerdatenbank.de/software/kweb-1.6.4.tar.gz
tar -xzf kweb-1.6.4.tar.gz
cd kweb-1.6.4
./debinstall

But get an error as you can see on this image: http://michaelfranz.dk/IMG_2166.JPG

Is something down ?

Also the debinstall runs preparekweb after install which should just be prepare.

Cheers
Michael Franz
Your download looks like it was corrupted. Try running the lines again. You must have an active internet connection.
There are 10 types of people: those who understand binary and those who don't.

michaelfranz
Posts: 50
Joined: Mon Mar 30, 2015 10:40 am

Re: Minimal Kiosk Browser

Sun Apr 19, 2015 5:08 pm

Just tried again with a new download.

Still not working:
http://michaelfranz.dk/IMG_2167.JPG

Look like something at raspbian.org is down?

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

Re: Minimal Kiosk Browser

Sun Apr 19, 2015 6:11 pm

If you install kweb on a fresh Raspbian installation it will install dependancies. You seem to have a problem with apt-get. On a new image you must run apt-get update first.
Yes, preparekweb must run after installation because it calls one of the installed programs to set up some data files. It also checks if programs (optionally) used by kweb are installed and recommends them.
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

DirkS
Posts: 9897
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Minimal Kiosk Browser

Sun Apr 19, 2015 6:21 pm

michaelfranz wrote:Just tried again with a new download.

Still not working:
http://michaelfranz.dk/IMG_2167.JPG

Look like something at raspbian.org is down?
No, it's online.
I think your package cache is not up to date. Try running 'sudo apt-get update' first.

michaelfranz
Posts: 50
Joined: Mon Mar 30, 2015 10:40 am

Re: Minimal Kiosk Browser

Sun Apr 19, 2015 7:04 pm

Perfect :) that did the trick :) perhaps others make the same mistake :) Maybe you should put it in the 4 lines for installation ?

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

Re: Minimal Kiosk Browser

Sun Apr 19, 2015 8:00 pm

michaelfranz wrote:Perfect :) that did the trick :) perhaps others make the same mistake :) Maybe you should put it in the 4 lines for installation ?
Yes, I'll do that in the next update.
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

oozo
Posts: 15
Joined: Wed Apr 15, 2015 1:04 am

Re: Minimal Kiosk Browser

Thu Apr 23, 2015 2:52 pm

Hey,

my Kweb is crashing after 3 or 4 hours :(

Where can i find log file to find out what is going on ?

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

Re: Minimal Kiosk Browser

Thu Apr 23, 2015 3:39 pm

oozo wrote:Hey,

my Kweb is crashing after 3 or 4 hours :(

Where can i find log file to find out what is going on ?
I still have your email in my pipeline :-)
In my place kweb is running for weeks and never crashes (there are some well known bugs in webkit3 which may affect kweb3 also).
I need to know more about your configuration to be able to help (use email).
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

Nhanleduy
Posts: 1
Joined: Mon Apr 27, 2015 9:07 am

Re: Minimal Kiosk Browser

Mon Apr 27, 2015 9:19 am

Dear Friends,

I would like to run url at a specific time (kweb schedule url) in kiosk mode, please help me to config kweb so that i can do my self.
For example at 06:30 run www.cdmt.vn, 07:15 run www.google.com...

My configuration is Pi + LCD TV for Display information at the lecturer building.

Thanks in advanced

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

Re: Minimal Kiosk Browser

Mon Apr 27, 2015 10:13 am

Nhanleduy wrote:Dear Friends,

I would like to run url at a specific time (kweb schedule url) in kiosk mode, please help me to config kweb so that i can do my self.
For example at 06:30 run http://www.cdmt.vn, 07:15 run http://www.google.com...

My configuration is Pi + LCD TV for Display information at the lecturer building.

Thanks in advanced
I can think of two solutions: creating a html file for every website with a full screen iframe pointing to the website and a refresh time set to an hour and then loading the next file etc.. You don't have an absolute timing, but if you start it at a certain time it will work.

The other way is to use a script (I'd prefer Python) and xdotool. xdotool will only work (at least for inserting URLs) with matchbox-window-manager (there's a simple example in the manual).
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

qe548
Posts: 3
Joined: Wed Apr 15, 2015 6:20 am

Re: Minimal Kiosk Browser

Mon Apr 27, 2015 6:16 pm

gkreidl wrote:
qe548 wrote:Thankyou for the clear response.

As suggested have installed xdotool and matchbox, created a .xsession file in home/user as suggested in the manual:

#!/bin/sh
matchbox­window­manager &
kweb ­KHCUA+­zbhrqfpoklgtjneduwxy file:///usr/local/share/kweb/kweb_about_a.html

That works marvellously well.

I would like to be able to run a python script which will direct kweb according to GPIO UART input that it has received, sending commands of the form:

subprocess.call(["xdotool", "key", "alt+i", "type", "http://www.google.com"])

So far no luck.

Two questions:

1) In order to launch the python script in the same environment as matchbox and kweb, should I launch it from the .xsession script above?

2) How can I then, during development, modify the python script and re-launch it for testing without rebooting the computer? Would it be possible to make the .xsession script something like:

#!/bin/sh
matchbox­window­manager &
kweb ­KHCUA+­zbhrqfpoklgtjneduwxy file:///usr/local/share/kweb/kweb_about_a.html
while true; do
python /home/user/test.py;
sleep 1s;
done

When the kiosk is then running, to save a new version of the file "test.py" (by SSHFS), kill the test.py process and then have it re-launch automatically from the .xsession script under the matchbox windowmanager?

My script doesn't work & can find very little information with google.
The subprocess xdotool call is missing a newline at the end. Try:
subprocess.call(["xdotool", "key", "alt+i", "type", "http://www.google.com\n"])

If you want to run the script above for development, add " &" to the kweb line.
This is all working very well now. Thank you.

When people use Kweb + Xdotool + Matchbox in a kiosk application (in particular Alt+i to send URLs) what options are there to prevent users of the kiosk's physical keyboard from controlling the browser? My kiosk users need to fill out a short form in a web page but do not need access to the Alt key at all. In fact I thought of taking the keyboard apart an modifying it!

Many thanks.

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

Re: Minimal Kiosk Browser

Mon Apr 27, 2015 8:49 pm

You could also enable only the keyboard commands you need in your application.
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

eIanTaylor
Posts: 6
Joined: Tue Apr 28, 2015 5:22 pm

Re: Minimal Kiosk Browser

Tue Apr 28, 2015 6:09 pm

After installing kweb, all browsers on the Pi 2 stopped working correctly.( and there's another thing that makes this even weirder)

I've had a couple of people working on this problem for a couple of days now and it is getting very irritating so I won't tell the whole story, just our latest tests. Here's what we have done:-

1 Bought 2 new Raspberry Pi 2 Bs
2 Bought 2 SD cards
3 Install a copy of Raspbian (downloaded from Rpi so it is the latest version)
booted OK
4 tried accessing a page in 'Web' ( Epiphany ), works OK
5 rebooted
6 did sudo apt-get update
7 did sudo apt-get upgrade -y
System should now be bang up to date
8 tried accessing a page in 'Web' ( Epiphany ), works OK
9 Installed kweb 1.6.4 exactly as explained in the manual. Completed OK. Not bothered about pdf or video so didn't install the other suggested software
10 Opened kweb, got configuration page. Seems to work ok.
11 tried accessing a web page in kweb. The browser closed, no error, nothing, just went away.
12 tried accessing a page in 'web' ( epiphany ), exactly the same, browser closed, no error.......
13 tested wget to ensure network is still ok. wget works fine
So, Wget can download a single file...
14 We created a test web page that had no dependencies ( css or js ) very simple page just says 'hello pi'
15 tried accessing the test page on all browsers, Works Ok
16 Added a dependency ( js file ) to the web page.
17 tried accessing the test page on all browsers, Works Ok-ish, browser closed about 1 in 10 attempts
18 added a second dependency ( js file ) to the test page
19 tried accessing the test page on all browsers, Browser always closes with no error message
So it appears there is a problem when more than about 2 or 3 files are requested in quick succession, the problem only arose after installing kweb and has affected all browsers on the system

Any suggestions as to what could have gone up to cause these symptoms? Does kweb install anything or update anything that could affect other browsers?

And here's the really weird bit... This only happens when the Pi is connected to some networks.
Before installing kweb everything works on all networks. we have tested this extensively
After installing kweb ( and this is the same for both Pis )
My home wired network - works perfectly :D
My home wifi - works perfectly :D
Corporate network at work - errors as described above :(
Mates home wired network - errors as above :(
Mates wifi - works perfectly :D

Any help greatly appreciated. We are all tearing our hair out trying to figure this out, we will be bald soon :(
Thanks

1775
Posts: 51
Joined: Sat Apr 18, 2015 4:16 am

Re: Minimal Kiosk Browser

Tue Apr 28, 2015 11:31 pm

Forgive my newness to all of this.

To install kweb - are all of the lines in the code listed entered one line at a time - each on its own prompt? I believe so, but just want to make sure. Thanks.

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

Re: Minimal Kiosk Browser

Wed Apr 29, 2015 12:07 am

Now this is really strange. kweb ist installed on thousands of systems and something like this did not happen before.

kweb installs some dependencies from the repository; libwebkit for gtk-2 and its dependencies (gstreamer 0.1 packages). These were installed by default in older Raspbian systems but that was changed, when epiphany became the standard browser. kweb3 has the same dependencies as epiphany (using the same engine). kweb uses the older engine (same as Midori).

There's no mixture of dependencies. epiphany should never be affected.

BTW, did you test any browsers taht don't use the webkit engine(s) (iceweasel or chromium)?

All webkit engines and browsers use ibsoup for network access. This is not changed by installing kweb. If all of them are crashing under certain conditions I suppose that it's libsoup which is crashing.

kweb itself is extremely stable and I haven't experienced a single crash for a long time.

The new webkit3 engine (and its supporting stuff) still have some bugs which affect epiphany and kweb3, although a lot of them have been fixed with the latest update a few days ago.

Some time ago proxy problems were reported for libsoup (but no crashes). But that would explain perhaps why you experience problems on certain networks only. But installing kweb doesn't do anything to libsoup (its already installed).

You should try the following:
On a fresh Raspbian installation, run the tests with epiphany on all networks.
Then run apt-get update/upgrade and copy the complete output text (so we can see which libraries are installed)
Run the same tests on all networks again with epiphany.
Install kweb and copy the text output during installation,
Then run the tests 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

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

Re: Minimal Kiosk Browser

Wed Apr 29, 2015 12:20 am

1775 wrote:Forgive my newness to all of this.

To install kweb - are all of the lines in the code listed entered one line at a time - each on its own prompt? I believe so, but just want to make sure. Thanks.
Yes.
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

eIanTaylor
Posts: 6
Joined: Tue Apr 28, 2015 5:22 pm

Re: Minimal Kiosk Browser

Wed Apr 29, 2015 11:04 am

Thanks for the reply

I've run through the install procedure again this time sending all the output to files. So far I've only been able to test on one of the networks that is known to fail. I will verify the working networks when I get home this evening

Started with a clean install of Raspbian
Tested 'web' - works OK
Installed and tested a chromium browser ( chromium ) and it works OK
sudo apt-get update produced the output in 01UpdateLog (attached)
sudo apt-get upgrade -y produced the output in 02UpgradeLog (attached)
Tested 'Web' and 'Chromium' and they are both still working OK
Installed kweb as per the instructions in the manual. The ./debinstall part of the process produced the output in 03DebinstallLog
Tested 'Web', 'Chromium' and 'Kweb' - Chromium is still working, web and kweb are closing down as before

Other info that may help to find the problem:-
- I can confirm that at least one of the networks that is causing the failure is behind a web-proxy / firewall / load balancer but it is all supposed to be transparent to us end users. For example under Windows we do not have any special setting on the LAN Setting tab of internet options and we have real public IP addresses
- The problem only seems to affect webkit based browsers, Chromium wasn't affected
- The problem only seems to affect pages where a real network access is involved. I noticed a couple of times that pages stored in the cache still loaded OK when others from the network caused the browser to close.

Thanks Again for looking in to this
Attachments
outputs.zip
Outputs from processes
(7.4 KiB) Downloaded 151 times

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

Re: Minimal Kiosk Browser

Wed Apr 29, 2015 12:34 pm

run
sudo dpkg -r kweb
test again
run

Code: Select all

sudo apt-get remove libavformat53 libpostproc52 libgail18 libmpcdec6 libzvbi-common libzvbi0 libcdaudio1 libgstreamer-plugins-bad0.10-0 libyajl2 libraptor2-0 libmhash2 librasqal3 librdf0 libslv2-9 gstreamer0.10-plugins-base gstreamer0.10-plugins-bad gstreamer0.10-ffmpeg gstreamer0.10-gconf gstreamer0.10-plugins-good gstreamer0.10-x libjavascriptcoregtk-1.0-0 libwebkitgtk-1.0-common libwebkitgtk-1.0-0
test again
run

Code: Select all

sudo apt-get install libavformat53 libpostproc52 libgail18 libmpcdec6 libzvbi-common libzvbi0 libcdaudio1 libgstreamer-plugins-bad0.10-0 libyajl2 libraptor2-0 libmhash2 librasqal3 librdf0 libslv2-9 gstreamer0.10-plugins-base gstreamer0.10-plugins-bad gstreamer0.10-ffmpeg gstreamer0.10-gconf gstreamer0.10-plugins-good gstreamer0.10-x libjavascriptcoregtk-1.0-0 libwebkitgtk-1.0-common libwebkitgtk-1.0-0
test again
install kweb again (./debinstall)
test 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

Return to “Raspbian”