Trying to make a Webkit Kiosk on Debian with Raspberry Pi
Asked Answered
C

6

8

I'm trying to build a Webkit Kiosk on a Raspberry Pi.

I found a good start at: https://github.com/pschultz/kiosk-browser

The things I want to do:

1) Start the kiosk without logging in (with inittab?)

Peter Schultz pointed out adding the following line:

1:2345:respawn:/usr/bin/startx -e /usr/bin/browser http://10.0.0.5/zfs/monitor tty1 /dev/tty1 2>&1

But he did not explain the steps to make this work (for noobs).

What I did is add his code to a personal git repository and cloned this repo to /usr/bin/kiosk and sudo apt-get install libwebkit-dev and sudo make.

The line to add to inittab will be:

1:2345:respawn:/usr/bin/startx -e /usr/bin/kiosk/browser http://my-kiosk-domain.com tty1 /dev/tty1 2>&1

If I do this, I generate a loop or some kind...

Categorize answered 28/6, 2012 at 19:57 Comment(3)
You might want to ask that here: <raspberrypi.stackexchange.com>Kellam
For people asking, due to strong demand, a fork of Instant WebKiosk for Raspberry Pi is now born. Raspberry digital signage: sourceforge.net/projects/raspberrysignHernandes
Came across github.com/futurice/chilipie-kiosk if you still in needAntimere
P
7

If you want to automatically load a browser full screen in kiosk mode every time you turn on the rpi you can add one of these two lines to the file /etc/xdg/lxsession/LXDE/autostart

@chromium --kiosk --incognito www.google.it
@midori -i 120 -e Fullscreen -a www.google.it -p

The first is for chromium and the latter is for midori, the rpi default lightweight browser.

Hint : Since we will use the rpi as a kiosk we want to prevent the screen from going black and disable the screensaver. Edit the autostart file:

sudo pico /etc/xdg/lxsession/LXDE/autostart

find the following line and comment it using a # (it should be located at the bottom)

#@xscreensaver -no-splash

and append the following lines

@xset s off 
@xset -dpms 
@xset s noblank 

Save, reboot.

More info on http://pikiosk.tumblr.com/post/38721623944/setup-raspberry-ssh-overclock-sta

Pangolin answered 25/12, 2012 at 18:9 Comment(1)
Hi I have a hackberry a10 device with cortex a8 and I could install Debian wheezy but I haven't been able to install chromium I always get errors about dependance etc. do you know a way to install it? I'm newbie In linux. Thanks a lot!!Vaenfila
D
4

The upvoted answer suggest to run LXDE for it. You could also do it without such a heaver desktop enviorment. You could just start midori or chromium in an X session:

xinit /usr/bin/midori -e Fullscreen -a http://www.examples.com/
xinit chromium --kiosk http://www.examples.com/

Sometimes Fullscreen mode of midori is not working as expected and midori is not using whole screen. In these cases you could map it inside a very simple window manager like MatchBox to get real fullscreen. Due to xinit you have to wrap everything in a shell script.

#!/bin/sh
matchbox-window-manager &
midori -e Fullscreen -a http://dev.mobilitylab.org/TransitScreen/screen/index/11

Autostart could be done simply be using /etc/rc.local.

More information concerning screensaver issues and an automated restart could be found here: https://github.com/MobilityLab/TransitScreen/wiki/Raspberry-Pi#running-without-a-desktop

Chromium has a dependency problem on some debian derivate for arm architecture. For Cubian you find the bug report here. I am not sure if you could install chromium on latest Raspbian without problem.

But I really could recommend midori. It's very fast and support for modern web technologies is very good. As Chromium it is using webkit as rendering engine. If you miss some html5 / css3 features consider an update of libwebkitgtk (for example by using package of debian testing).

Devitt answered 29/9, 2014 at 2:9 Comment(1)
but running that from rc local won't run X and chromium/midori as root? Maybe we want to add a limited user and su -c "browser-script" luser to itApograph
T
2

It's possible you haven't set the DISPLAY environment variable.

Try:

export DISPLAY=:0
/usr/bin/startx /usr/bin/browser

Or, browser can also take a display argument (so you don't need the environment variable):

/usr/bin/startx /usr/bin/browser :0

This works for me on Raspbian from a standard terminal shell (I'm logged in over SSH).

Townsfolk answered 21/11, 2012 at 21:53 Comment(0)
P
1

Updated for the current version of Raspbian (with Pixel desktop) install with noop 2.0.

I found you need to edit in two different places to get it to work.

  1. /etc/xdg/lxsession/LXDE/autostart
  2. /home/pi/.config/lxsession/LXDE-pi/autostart

So my configure file is:

# @xscreensaver -no-splash

@xset s off 
@xset -dpms 
@xset s noblank 

@chromium-browser --kiosk --incognito http://localhost

And that's it.

Preprandial answered 28/11, 2016 at 16:8 Comment(0)
F
0

You should probably start with checking if /usr/bin/kiosk/browser is working at all. You should start normal X session (graphical environment) on your RaspberryPi, launch terminal, try running this command:

/usr/bin/kiosk/browser http://my-kiosk-domain.com

and see what it prints on the terminal. Is this working? Do you see any error messages?

Fritillary answered 9/8, 2012 at 8:34 Comment(0)
B
0

I'm trying to build a Webkit Kiosk on a Raspberry Pi.

I think Instant WebKiosk for Raspberry Pi could be useful for you. See: http://www.binaryemotions.com/raspberry-digital-signage/

Brattice answered 9/8, 2012 at 9:11 Comment(2)
On SO, when providing a link to an external site, it is often best to give at least a high level summary of what the contents are in case the external link changes or is deleted. Future SO visitors will still have something to work with.Kagoshima
Thx, specs looks nice but is no Webkit but Firefox based Kiosk.Categorize

© 2022 - 2024 — McMap. All rights reserved.