Skip to content

Instantly share code, notes, and snippets.

@drio
Last active August 15, 2019 18:37
Show Gist options
  • Save drio/5374192 to your computer and use it in GitHub Desktop.
Save drio/5374192 to your computer and use it in GitHub Desktop.
How to boot a raspberry PI straight into a Librato dashboard and reload different URLs.

RaspberryPI in kiosk mode to boot straight into a Librato dashboard.

(See all these in action here.)

Bilby Stampede

Intro

See all these in action here.

We want to be able to hook a RasberryPI (RP) to our HDTV and make the RP boot straight into a librato dashboard (or any other url). Then we also want to remotely change to other urls.

Requirements

You need a RP, power adaptor, memory card (preferable a class 10) and HDMI cable. You can get all that from amazon. A warning here: the seller in amazon is charging 45$ for a RP when the price should be 35$. You decide.

Flashing the card with Raspbian

Download the latest raspbian image and load it into your memory card.

Setting up the OS to boot straight into your librato dashboard

The good people at niteoweb have the instructions to accomplish this. I am just copying the instructions here for future reference:

Disable screen sleep, so the screen stays on:

$ sudo vim /etc/lightdm/lightdm.conf

# add the following lines to the [SeatDefaults] section

# don't sleep the screen
xserver-command=X -s 0 dpms

Hide cursor on inactivity
$ sudo apt-get install unclutter

Configure LXDE to start the Midori browser on login
$ sudo vim /etc/xdg/lxsession/LXDE/autostart

# comment everything and add the following lines
@xset s off
@xset -dpms
@xset s noblank
@midori -e Fullscreen -a http://YOUR_URL_HERE

Change YOUR_URL_HERE to whatever url you want the RP to boot into.

If you now reboot your RP you should get straight into that URL in kiosc mode.

Loading other urls.

Ssh into the RP (as user pi) and run:

( killall midori ; midori -e Fullscreen -a NEW_URL_HERE --display=:0 )

Repeat when you want to load other URLs.

There are better ways to load new sites, add a comment if you know one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment