![]() At Parallax we love real-time metrics and have employed an army of Raspberry Pi’s which keep us up to date with site and server metrics, and a page full of cats. We have three large monitors which display various different statistics and are fully automated to wake and sleep with the office. Furthermore, we love being able to give these to our clients so they are able to monitor how they’re doing at any given time of the day. I’m often asked how to set this up so have put together this tutorial to help those who also want to achieve similar results using the Raspberry Pi. I’ll go through everything from first boot (if you’re struggling with installing an OS please let me know) to automatically opening your dashboard or webpage in fullscreen and hide the mouse pointer. ![]()
![]() Getting Started Note: This may be different if you purchased a NOOBS prepackaged SD but a simple sudo raspi-config from the terminal will give the same result. First thing we should do is select the update selection from the menu (if you’re connected to the internet) Then select overscan option and disable it. Now go back to the first menu and select the ssh option and enable it. Select boot_behaviour and select it to always boot to desktop environment when it is turned on, rather than the command line interface. Select Finish and the Raspberry Pi will reboot and automatically boot to the GUI home screen. ![]() SSH To connect to your pi via SSH (or using terminal on your pi) use the following:
On the password prompt enter raspberry unless you’ve changed it Tip: If you don’t know what the ip of your pi is you can use ifconfig from the Pi or if you have nmap installed you can use:
Note: To install nmap on osx use brew install nmap (requries brew) Update First thing you should do before installing anything is update, don’t bother upgrading though as something will no doubt break.
![]() Install Chromium We now need to install the browser and a few other things to make it look better on TVs. To install Chromium, x11-server-utils and unclutter use the following command.
You can also add ttf-mscorefonts-installer to this if you want which will make the fonts render better (but its not necessary) Start Chromium on Boot In order to start Chromium on boot in full screen we need to do the following. cd and edit autostart
Please remove @xscreensaver line as it’s not needed and add the following:
Modify and exit the buffer to continue (ctrl+x) then Y Issue a reboot and you’re good to go!
Advanced: Automating your dashboard The following isn’t really necessary but it’s rather useful. Cron jobs are relatively easy to set up and will allow your TV and Pi to switch itself on and off at a given time. We use cron jobs at Parallax to switch on our dashboards when we arrive in the morning then off again when we leave. To check to see if there is already cron tabs set up use the following command to list them:
There shouldn’t be but don’t worry if you already have some. Create yourself a script to turn the TV back on
Enter this as the contents
Now set up the cronjob
Add the following lines
This will set the screen to come on everyday at 8am and turn off at 6pm. Please see the diagram below for help with cron syntax. There you have it, a brief introduction to setting up a Raspberry Pi. As a digital agency, it’s incredibly important for us to meet our objectives and being able to display them on dashboards around the office is a fantastic way of seeing how we’re performing. Want to know more? Just give us a shout. |