Skip to content

Instantly share code, notes, and snippets.

@andrewvaughan
Last active April 3, 2022 14:46
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save andrewvaughan/811b0385ff9a669986ca to your computer and use it in GitHub Desktop.
Save andrewvaughan/811b0385ff9a669986ca to your computer and use it in GitHub Desktop.
Create a Raspberry Pi Rotating Dashboard

These instructions were performed on a RaspberryPI 2 with a proper heatsink.

Install NOOBS

  1. Follow these instructions to install NOOBS with a Mac.
  2. Choose "Raspbian" from the selected options when installing.

Configure the Pi

sudo raspi-config
  1. Choose 1. Expand Filesystem
  2. Choose 3. Enable Boot to Desktop/Scratch and choose Desktop Log in as user 'pi' at the graphical desktop
  3. Choose 7. Overclock and choose Medium
  4. Choose 8. Advanced Options
  5. Choose A1 Overscan and Enable it
  6. Choose A2 Hostname and set a hostname

Make VIM work with arrows and backspace

vi ~/.vimrc

Set these configurations:

set nocp
set backspace=2

Set the default display to the pi, not SSH

vi ~/.bashprofile

Add this line:

export DISPLAY=:0

And reload:

. ~/.bashprofile

Setup WiFi for WPA2-Enterprise

sudo -E vi /etc/wpa_supplicant/wpa_supplicant.conf

Make the file look like this:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
        ssid="HHC"
        proto=RSN
        key_mgmt=WPA-EAP
        pairwise=CCMP
        auth_alg=OPEN
        eap=PEAP
        identity="hhc\YOUR_GID"
        password="YOUR_PASSWORD"
        phase2="auth=MSCHAPV2"
        scan_ssid=1
}

Then reboot

sudo shutdown -r now

Update Aptitude

sudo apt-get update
sudo apt-get upgrade

Install Packages

  • iceweasel - A Mozilla Firefox port without branding made for the Pi
  • gnash and lightspark - Adobe Flash alternatives
  • nginx - Our web server
  • php5 - PHP server
sudo apt-get install iceweasel gnash gnash-common browser-plugin-gnash lightspark browser-plugin-lightspark nginx php5 php5-cli php5-fpm

Create server info site

mkdir ~/www
vi ~/www/index.php

Add the following:

<!doctype html>
<html>
  <head>
    <title>Server Information</title>
  </head>
  <body>
    <table width="80%" align="center">
      <tr>
        <td>Server IP</td>
        <td><?php echo $_SERVER["SERVER_ADDR"]; ?></td>
      </tr>
      <tr>
        <td>Details</td>
        <td><?php echo php_uname(); ?></td>
      </tr>
    </table>
  </body>
</html>

Setup Nginx

sudo -E vi /etc/nginx/sites-enabled/default

Delete the file contents and add this:

server {
  listen      80;
  server_name localhost;
  
  root  /home/pi/www;
  
  location / {
    index index.html index.php;
  }
  
  location ~ \.php$ {
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_index index.php;
    
    include       fastcgi_params;
  }
}

Setup Iceweasel

iceweasel

Install these addons and restart:

Setup tabs to go through, and modify preferences to open those tabs each time.

Disable Power Saving and Boot into Iceweasel Kiosk

ln -s /etc/xdg/lxsession/LXDE-pi/autostart ~/autostart
sudo -E vi ~/autostart

Make the file look as follows:

@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
#@xscreensaver -no-splash

# Turn off screen power saving
@xset s off
@xset -dpms
@xset s noblank

# Start Iceweasel by default
@iceweasel
@sebastianmurillonader
Copy link

sebastianmurillonader commented Jan 3, 2018

Hi @andrewvaughan!

This is awesome, I've been looking for something like this for months! I'm completely new to PI and planning to buy one for the sole purpose of displaying rotating tabs on a screen (trello boards, airtable bases, etc). Any recommendations on PI specifications I should look for? I planned to get this one: https://www.amazon.com/CanaKit-Raspberry-Complete-Starter-Kit/dp/B0778CZ97B/ref=sr_1_1_sspa?s=pc&ie=UTF8&qid=1515009624&sr=1-1-spons&keywords=Raspberry+Pi+3&psc=1.

Something else you think I might be missing to make it work apart from your great project?

Thanks a lot for the help!

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