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

Kweb Suite (Minimal Kiosk Browser, omxplayerGUI)

Wed Apr 17, 2013 11:24 am

Update August, 25th, 2019: Upgrade for Buster is now available.
Update November, 16th, 2018: I've just published a hotfix of the kweb suite for Stretch. For details see: https://www.raspberrypi.org/forums/view ... 9#p1392789
Update September, 22, 2017: Version 1.7.9.8 for Stretch is now available.
Update August, 30th, 2017: Version 1.7.9.7 "Jessie final" is now available. A first Stretch version will follow soon.
Important note: If you have been using xinit to start embedded kweb applications as described in the manual, please read the following: https://www.raspberrypi.org/forums/view ... 9#p1084441
For Flash and internal PDF support read this: https://www.raspberrypi.org/forums/view ... 5#p1131898


The kweb suite adds a number of programs to Raspbian which integrate web access, media support and command execution. It includes two simple but highly configurable web browsers with some unique features and a hardware accelerated media player based on omxplayer with support for web video. The programs are available from the desktop but can also be used to develop embedded applications (kiosks, digital signage, browser based desktop environments and much more).The kweb environment consists of a number of HTML pages which can be extended by the user without any coding experience.

The kweb suite can be used on any kind of Raspberry Pi. It uses external programs for a lot of things (wget/uget for downloads, mupdf, xpdf or evince to display PDF, omxplayer for media playback, youtube-dl for web video access) and thus on a Raspberry Pi 2 or 3 the load distributes nicely across multiple cores. Although the webkit engines used by kweb are single core only, both browsers can use multiple cores to display multiple web windows.

Desktop Programs:
kweb (Minimal Kiosk Browser) - web browser using GTK+2 and the default webkitgtk library
kweb3 (Minimal Kiosk Browser GTK+3) - web browser using GTK+3 and the hardware accelerated webkitgtk3 library
In Raspbian Stretch, both browsers have been merged into one again, kweb, using GTK+3.
omxplayerGUI - GUIs for omxplayer including an audio player, a video player and a media player frontend.

Utilities:
kweb_edit.py - special text editor for kweb's command interface and frontend for the HTML generator
kweb_bookmark.py - bookmark utility used by kweb(3)
ytdl_server.py - special web server for fast web video access and optional web interface to local media
... plus a number of python programs and scripts used internally

Kweb Environment:
The kweb environment pages can be accessed from kweb's menu and control panel pages or from kweb's :command interface. Some of these pages are managed and built dynamically by kweb's helper programs. Some pages can be edited by the user and he can also add new pages without any knowledge of HTML coding with the help of kweb's special text editor and HTML generator. These pages support kweb's unique command interface which allows execution of any kind of program or browser command when the user clicks a button, link or icon or automatically when a page loads. From a simple web form the user can create keyboard shortcuts or buttons which execute up to four commands at the same time (extensible by manual editing).

Documentation:
Two extensive PDF manuals (kweb and omxplayerGUI, together more than 110 pages) which cover everything from basic usage to tutorials and developer's information. The manuals can be opened from inside the programs (kweb or omxplayerGUI frontend). Recent changes can be found in the changelog.

Playing web video from any browser with omxplayerGUI
Kweb's built-in function to play web video in high quality with omxplayerGUI can also be used from other browsers:
https://www.raspberrypi.org/forums/view ... 6&t=193811

The kweb suite is free and Open Source software published under the GPL license. Source code is a avaiable as a separate download.

Installation for Buster and Stretch
Step 1:

Code: Select all

wget http://steinerdatenbank.de/software/kweb-1.7.9.8.tar.gz
tar -xzf kweb-1.7.9.8.tar.gz
cd kweb-1.7.9.8
./debinstall
Youtube-dl will be installed automatically now using pip.

Step 2 for Buster:

Code: Select all

wget http://steinerdatenbank.de/software/kweb_upgrade_buster_20190823.tar.gz
tar -xzf kweb_upgrade_buster_20190823.tar.gz
cd kweb_upgrade_buster_20190823
./install
Step 2 for Stretch:

Code: Select all

wget http://steinerdatenbank.de/software/kweb_upgrade_stretch_20190408.tar.gz
tar -xzf kweb_upgrade_stretch_20190408.tar.gz
cd kweb_upgrade_stretch_20190408
./install
Some information about the new functions of the partial Upgrade: https://www.raspberrypi.org/forums/view ... 0#p1456860

Installation for Jessie

Code: Select all

wget http://steinerdatenbank.de/software/kweb-1.7.9.7.tar.gz
tar -xzf kweb-1.7.9.7.tar.gz
cd kweb-1.7.9.7
./debinstall
The output at the end of the installation will tell you, if all programs needed or recommended in combination with kweb are installed or how to install them.

For Raspbian Wheezy users version 1.6.8 is still available, but it will not be supported any more:

Code: Select all

wget http://steinerdatenbank.de/software/kweb-1.6.8.tar.gz
tar -xzf kweb-1.6.8.tar.gz
cd kweb-1.6.8
./debinstall
The following image shows a desktop application running in kweb. In fact, it is the desktop I'm using on one of my RPis. The right part of the desktop window can embedd any kind of web content. Here it shows the start page of the ytdl-server with access to local media.

Image

The attached image shows kweb's user interface including the tooltip text of the entry field.
Attachments
interface.jpg
interface.jpg (40.73 KiB) Viewed 301599 times
Last edited by gkreidl on Sun Aug 25, 2019 6:33 am, edited 68 times in total.
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

colter
Posts: 1
Joined: Fri Apr 19, 2013 5:50 pm

Re: Minimal Kiosk Browser

Fri Apr 19, 2013 5:53 pm

Good Morning,

While I know it's choppy I was wondering if this would work with one of the Flash plugins.

I'm not trying to run anything too intensive, I only need the system to run one website for a demonstration (and of course, its built in flash). www.energyville.com

It seems to run within midori on the normal install (unusable, but runs) but the plugin maxes out the available resources. So, I'm wondering if this solution (booted into it) will give the edge needed to run this simple site.

Let me know what you think.

Thanks!

-Colter

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

Re: Minimal Kiosk Browser

Fri Apr 19, 2013 9:31 pm

There is no flash on the Raspberry Pi and never will be. And everything that uses large amounts of Javascript - especially AJAX pages - will be slow. There is nothing you can do about that.

The basic engine is the same as the one used in Midori and Chromium (webkit). But by keeping it simple the browser is definitely faster than both.
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

lhmanuel
Posts: 2
Joined: Mon May 20, 2013 2:07 pm

Re: Minimal Kiosk Browser

Mon May 20, 2013 3:06 pm

Hi gkreidl, "kweb" works very well in kiosk mode, is just what I was looking for. questions: I can embed a python script in a div in the homepage.html?. In the README file you say that kweb can play a video or m3u playlist, you can embed a video playlist in a div of homepage.html and played with OMXPLAYER

Please excuse my bad English.

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

Re: Minimal Kiosk Browser

Mon May 20, 2013 9:37 pm

no embedded Python needed. Just insert links like this into your homepage:

<a href="file:///home/pi/playlist.m3u">Playlist</a>

It must contain the full path of the m3u playlist.
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

lhmanuel
Posts: 2
Joined: Mon May 20, 2013 2:07 pm

Re: Minimal Kiosk Browser

Tue May 21, 2013 10:28 am

thank a lot for the answer, but I just need the omxplayer played a playlist inside a div window of the "homepage.html" when the rpi boot in mode kiosk.

I have this python script from http://weetinyworld.blogspot.com.es/201 ... nage.html:

import os,sys,time

def RunPlaylist():
while 1:
path = '/home/pi/digitalsignage/current.m3u'
file = open(path,'r')
files = file.readlines()
file.close()
os.chdir('/home/pi/digitalsignage/movies')
for file in files:
filename = file.strip()
if '.mp4' in filename:
os.system('/usr/bin/omxplayer /home/pi/digitalsignage/movies/%s>/dev/null' % filename)
return

if __name__ == '__main__':
RunPlaylist()
sys.exit()


this script play a playlist with the videos of the movie dir. May I embebed this script in the homepage.html? or "kweb" have another solution for his.

Thank you very much and my best,

lhmanuel

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

Re: Minimal Kiosk Browser

Tue May 21, 2013 10:58 am

Embedding any kind of command into the homepage is easy:

Let's assume your python script (made executable and with something like:
#!/usr/bin/python in the first line) is /home/pi/myscript.py.

Then add a link like this to your homepage.html file:

<a href="file:///homepage.html?cmd=/home/pi/myscript.py">Play Videos</a>

If you move your python script to /usr/local/bin you dont need the full path:

<a href="file:///homepage.html?cmd=myscript.py">Play Videos</a>
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

vrnaidu
Posts: 1
Joined: Thu Jun 06, 2013 12:26 am

Re: Minimal Kiosk Browser

Thu Jun 06, 2013 12:40 am

Hi gkreidl,

I have installed kweb as mentioned in README file..but when i try to access any pdf file from internet or locallyI am getting following error message:

python: can't open file '/usr/local/bin/kwebhelper.py': [Errno 13] Permission denied

Also I could not access youtube videos through kweb despite installing youtube-dl. I am getting the following error message:

"The Adobe Flash Player or an HTML5 supported browser is required for video playback"

Can you please help me how to resolve these issues.

I am running raspbian wheezy latest version.

Regards,
Ramesh

alanrpi
Posts: 8
Joined: Wed May 16, 2012 5:05 pm

Re: Minimal Kiosk Browser

Thu Jun 06, 2013 6:05 am

I use chromium in kiosk mode and I've turned off as much as I can, also I'm not running any window manager, just plain Xorg. I've managed to get it pretty fast this way.

This line is to remove yellow notification bar saying "Chrome did not shut down safely... Restore tabs...":

Code: Select all

sed -i 's/"exited_cleanly": false/"exited_cleanly": true/' ~/.config/chromium/Default/Preferences
And this is how I start chromium:

Code: Select all

chromium --kiosk --enable-kiosk-mode --enabled --touch-events --touch-events-ui --disable-ipv6 --allow-file-access-from-files --disable-java --disable-restore-session-state --disable-sync --disable-translate --disk-cache-size=1 --media-cache-size=1 "index.html"
You can add --incognito too, if you don't need localstorage/cookies etc. to be saved.

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

Re: Minimal Kiosk Browser

Thu Jun 06, 2013 8:08 am

vrnaidu wrote:Hi gkreidl,

I have installed kweb as mentioned in README file..but when i try to access any pdf file from internet or locallyI am getting following error message:

python: can't open file '/usr/local/bin/kwebhelper.py': [Errno 13] Permission denied

Also I could not access youtube videos through kweb despite installing youtube-dl. I am getting the following error message:

"The Adobe Flash Player or an HTML5 supported browser is required for video playback"

Can you please help me how to resolve these issues.

I am running raspbian wheezy latest version.

Regards,
Ramesh
As the error message says, there is something wrong with access rights of kwebhelper.py. This should help:

Open a terminal.
cd into kweb-1.0 folder
chmod +xr kwebhelper.py
sudo make install

None of the "add-ons" (audio, video, pdf, youtube) will work, if kwebhelper.py cannot be executed.

To play youtube video, go to the youtube page, where the video usually will be played (inside the browser). Then click the "play" icon in the toolbar. The screen goes black and after a few seconds the youtube video will be played by omxplayer and you can control it with its usual keyboard commands.

It's better to disable javascript on youtube (although the display is not as nice then).
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

Re: Minimal Kiosk Browser

Thu Jun 06, 2013 8:14 am

@alanrpi;

Nice idea, but I think you published this in the wrong thread. People won't find it here.

BTW, kweb cannot be used without a window manager as I use the "fullscreen" command, but this can be changed easily by changing two lines of code (just commenting out one line, and uncomment another and perhaps change the screen size).
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

alanrpi
Posts: 8
Joined: Wed May 16, 2012 5:05 pm

Re: Minimal Kiosk Browser

Thu Jun 06, 2013 9:53 am

gkreidl wrote:@alanrpi;
Woops. This is what happens if you're reading only the title ...

jfinnigan
Posts: 1
Joined: Fri Jun 07, 2013 3:20 am

Re: Minimal Kiosk Browser

Fri Jun 07, 2013 3:24 am

is there a way to have Kweb go back to a certian web page after a set time of inactivity? similar to this for chrome

https://chrome.google.com/webstore/deta ... admd?hl=en ?

Would be great if anyone knows how

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

Re: Minimal Kiosk Browser

Fri Jun 07, 2013 7:43 am

jfinnigan wrote:is there a way to have Kweb go back to a certian web page after a set time of inactivity? similar to this for chrome

https://chrome.google.com/webstore/deta ... admd?hl=en ?

Would be great if anyone knows how
No chance. It would have to be hard coded into the program. However, source code is supplied with the package ...
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

vbguyny
Posts: 4
Joined: Tue Nov 29, 2011 3:59 pm

Re: Minimal Kiosk Browser

Sun Jun 16, 2013 7:56 pm

I installed this browser today on my model b running raspbian (wheezy) but youtube and other sites report back that the browser doesn't support the video tag. Any suggestions?

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

Re: Minimal Kiosk Browser

Sun Jun 16, 2013 8:06 pm

Seems, that you did not read the README file.

Youtube works only on original Youtube pages. Click the Play icon in the toolbar and the video will play fullscreen in omxplayer (will take a few seconds for youtube-dl to get the stream).

Workaround for embedded youtube videos on other pages (if they don't play with the method decribed above): right click into the video frame and select: open frame in new window. Then click the Play icon.

From time to time you should update youtube-dl:
sudo youtube-dl -U
(from a terminal)
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

vbguyny
Posts: 4
Joined: Tue Nov 29, 2011 3:59 pm

Re: Minimal Kiosk Browser

Sun Jun 16, 2013 9:55 pm

@gkreidl: Thanks for the quick response. However at no point did I mention YouTube. I am trying to view video in web pages that utilitize the HTML video tag.

For example, the following url reports that there is no video support: http://www.w3schools.com/html/tryit.asp ... eo_html5_4

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

Re: Minimal Kiosk Browser

Mon Jun 17, 2013 8:00 am

The video tag is supported by webkit and so also by kweb.

I can even play it inside the browser, but without hardware acceleration it's no fun. But you can right click into the video area and select "open video in new window" and then it will be played with omxplayer.

I just tested it with the link you supplied.
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

vbguyny
Posts: 4
Joined: Tue Nov 29, 2011 3:59 pm

Re: Minimal Kiosk Browser

Wed Jun 19, 2013 1:45 am

@gkreidl: I started over again from scratch by removing the kweb browser via the remove.sh script in the kweb folder. I verified that I have the latest versions of omxplayer and youtube-dl. I also did the chmod -xr for the kwebhelper.py file as indicate above.

I also ran the make on the install file and ran the install.sh as sudo (everything above also ran with sudo). But I don't see any video's playing. All I get is the message that reads your browser doesn't support video. I get the same message if I right click and load the frame into a new window.

For good measure I tried out YoutTube anyway, it doesn't work either. I get the message indicating that Flash needs to be installed. I tried disabling JavaScript and restarting the browser with no success. I even went as far as changing the HDMI cable to using the headphone jack and RCA for video.

HELP!

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

Re: Minimal Kiosk Browser

Wed Jun 19, 2013 6:17 am

@vbguyny:

Are you running the latest Raspbian version (apt-get update, upgrade)?

If you open the test page with the video tag in Midori, what happens (just a test, if your webkit library is up to date)? Midori should play the video, although badly. Midori and kweb use the same webkit library.

Did you create a "Downloads" directory inside your home directory? (Not only needed for Downloads, but also for a fifo buffer for youtube)

Is perhaps "xterm" not installed (should so by default)?

run "ls /usr/local/bin -l" in a terminal. Does it show kwebhelper.py with:
"- rwxr-xr-x"?

The message, that flash is missing is not important. To play the video on the youtube page, you have to click the "play" icon in the toolbar. It will not play inside the browser page.

You do not have to restart kweb to disable Javascript. There is a toggle button (icon) in the toolbar which disables/enables Javascript (and also reloads the page each time).

Run kweb from a terminal. Do you see any error messages inside the terminal, while trying to play a youtube video?
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

tvjon
Posts: 854
Joined: Mon Jan 07, 2013 9:11 am

Re: Minimal Kiosk Browser

Thu Jun 20, 2013 5:47 pm

Guenter,

thank you for posting kweb. It compares in speed with luakit, which is what I'm using to post this message :)

I 've just updated omxplayer to today's build, but exactly the same response as before.
Here's the response sitting in the terminal window from which I called kweb, so maybe it gives you an idea where I might look next?

The first 2 lines are when trying to play the webcam from:

http://www.ospreys.org.uk/webcam/

Subsequent lines however, are from an attempt to play a Youtube video. I have read your Readme :)

kweb
** Message: console message: http://players.click2stream.com/jwplaye ... wplayer.js @1: No suitable players found

** Message: console message: http://players.click2stream.com/jwplaye ... wplayer.js @1: No suitable players found

omxplayer.bin: no process found
Traceback (most recent call last):
File "/usr/local/bin/kwebhelper.py", line 114, in <module>
dummy = subprocess.call(pargs)
File "/usr/lib/python2.7/subprocess.py", line 493, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1259, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
[youtube] Setting language
[youtube] oWH7Rqc-5No: Downloading video webpage
[youtube] oWH7Rqc-5No: Downloading video info webpage
omxplayer.bin: no process found
Traceback (most recent call last):
File "/usr/local/bin/kwebhelper.py", line 114, in <module>
dummy = subprocess.call(pargs)
File "/usr/lib/python2.7/subprocess.py", line 493, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1259, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
[youtube] oWH7Rqc-5No: Extracting video information
[youtube] Setting language
[youtube] oWH7Rqc-5No: Downloading video webpage
[youtube] oWH7Rqc-5No: Downloading video info webpage
[youtube] oWH7Rqc-5No: Extracting video information

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

Re: Minimal Kiosk Browser

Thu Jun 20, 2013 6:52 pm

Your video from http://www.ospreys.org.uk/webcam/ uses a flash player. We dont have flash on the RPi ...

There is one possiple ecplanation for the other error: xterm is not installed on your system. Please test this.

xterm is used to start omxplayer in and provides access to keyboard commands. It should be installed by default. If it has been removed, the error message you sent me makes sense.
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

tvjon
Posts: 854
Joined: Mon Jan 07, 2013 9:11 am

Re: Minimal Kiosk Browser

Thu Jun 20, 2013 6:58 pm

Thank you for the prompt reply.

Yes, I was hoping they had a h264 version, but sadly no.

I was just about to respond that although xterm apparently should be installed, it's not. I certainly haven't purposely uninstalled it. Anyway I've just installed xterm, & now it has indeed played that youtube video. I'll do some more testing with kweb now, thank you.

EasyViber
Posts: 3
Joined: Tue Jan 15, 2013 1:44 pm

Re: Minimal Kiosk Browser

Thu Jul 11, 2013 4:45 pm

I had no luck with kweb :( In fact, I couldn't get it run.

I've tryed everything, sudo make install or running install.sh... It gets installed, I get it in applications menu, it is in /usr/bin, but when I try to run it I get
"bash: /usr/bin/kweb: No such file or directory"

Ofc. file is there.

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

Re: Minimal Kiosk Browser

Thu Jul 11, 2013 5:13 pm

EasyViber wrote:I had no luck with kweb :( In fact, I couldn't get it run.

I've tryed everything, sudo make install or running install.sh... It gets installed, I get it in applications menu, it is in /usr/bin, but when I try to run it I get
"bash: /usr/bin/kweb: No such file or directory"

Ofc. file is there.
Did you donwload and unpack it on another computer? The executable flag may not be set correctly for kweb und kwebhelper.py.
Run "ls /usr/bin -l" and "ls /usr/local/bin -l" in a terminal and check the file permissions.
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 “Raspberry Pi OS”