Autostart browser on Raspberry Pi

First use this approach to create a python based browser, call it browser.py and leave it in pi’s home directory.

Set up .xinitrc to contain the following:

#!/bin/sh
xset s off
xset -dpms
xset s noblack
/home/pi/loop

The first three commands disable screen-blanking and the last one runs a script called loop, which looks like this:

#!/bin/bash
while :
do
	./browser.py
done

This makes sure that the browser automaticly restarts if it crashes, or if you kill the process manually, in order to reload the website. Finally take care of permissions:

chmod 755 .xinitrc browser.py loop

Then use raspi-config to make sure that the system logs in as “pi” without waiting for password, and you’re done.

Dette indlæg blev udgivet i Uncategorized. Bogmærk permalinket.