andymiller
Posts: 5
Joined: Wed Feb 11, 2015 7:37 am

Boot into a web browser

Wed Feb 11, 2015 10:04 pm

I have a synology cctv NVR running.

My aim for my pi2 is to have it boot up and open straight onto the cctv webpage for viewing.

What is the easiest way to achieve this and with what OS?

User avatar
topguy
Posts: 6491
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Boot into a web browser

Wed Feb 11, 2015 10:56 pm

How I would do it...
- Install raspbian
- Configure to boot automatically into X-windows (LXDE-desktop)
- In /etc/rc.local i would launch another script in the background.
Something like: su pi -c "/home/pi/weblaunch.sh &"
- The code in the weblauch.sh script would be something like...

Code: Select all

#!/bin/bash

#set which x-windows display to use
export DISPLAY=:0.0

#pause for a while so X-windows can start.
sleep 25

#start the browser.
/usr/bin/epiphany 
This is of course completely untested, and you can find other threads about similar topics in the forum, just search for "rc.local"

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

Re: Boot into a web browser

Thu Feb 12, 2015 1:55 am

This is a crappy solution (if it works at all).

Either use autostart after booting into the desktop or boot into a windows manager and then start the browser using xinit and small script (the desktop might be superfluous for such applications).

You'll find more details in my Minimal Kiosk Browser Manual, page 27 ff.
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 “Beginners”