It is not unusual to setup some displays to provide at-a-glance metrics for the various systems under your care. With great software like Nagios, Cacti, Splunk, Graylog and many others, it is easy to collect, centralize and visualize your data. However, in this article I want to talk about an easy and cost-effective way to handily display this data.
I lucked out because a year ago my employer moved into a new office and we were able to design and build-out our new space however we wanted. I planned ahead and had the contractors put in the power, data jacks and wall mounting for four identical 27 inch LCD monitors up near the ceiling above where I expected our desks to be. I understand this is fortuitous timing, but you can just work with what you have. I started out using the Raspberry Pi 2, but I have recently upgraded them to the Raspberry Pi 3 model. One of the nice benefits of the Pi 3 is the addition of built-in WiFi capability which should make retrofit installation a bit easier if you do not already have data jacks available nearby.
Otherwise, you just need the regular Raspberry Pi stuff; micro-USB power, network connectivity and an HDMI connection to your display.
Assuming you do not have to worry about hiring contractors to run power or data, and you are just going to throw a monitor up on a shelf, you can probable do this project for a few hundred dollars per station. This should allow this project be compatible with all but the most shoestring of budgets.
I used Raspbian for this project, you could use another operating system but the instructions in this article will change depending on which desktop environment you use. At the time of writing, Raspbian uses the LightDM display manager.
I will not be going into the specifics of OS installation on a Raspberry Pi as there are lots of tutorials out there. To save yourself headache, I do recommend enabling the passwordless auto-login feature and I do also recommend utilizing the official Raspberry Pi documentation.
The next sections outline some of the configuration changes needed to ensure that the monitors will stay on indefinitely, sans screensaver.
To disable the powersaving features of KBD, edit the /etc/kbd/config
file and ensure the following is set:
Configure X
via the /etc/lightdm/lightdm.conf
file to set the screensaver timeout to 0 (infinite) and to disable DPMS (display power management services). Make sure to set the xserver-command
setting within the SeatDefaults
section of this file.
This step may be skipped depending on your displays. For the 27 inch LG monitors available to me, I used the following values in /boot/config.txt
:
In case display scaling needs to be adjusted, please refer to the official Raspberry Pi documentation for the config.txt
options.
Part of the nice thing about having a monitor station, is not having to touch it. Apart from the displays, I use no other peripherals. In order to accomplish this, first ensure passwordless auto-login has been enabled via the raspi-config
setup utility.
Next, configure LightDM to autostart applications by first creating an autostart
directory within ~/.config
using the following command:
Create a file inside the ~/.config/autostart/
directory to hold the application autostart configuration. My application is the Midori browser, but any application will work. Using Midori for an example, edit ~/.config/autostart/midori.desktop
and add the following:
You would enter whatever URL applies to you. In my case, we have an internal server that provides different content based on a GET value.
As mentioned above, Midori is not required. Instead you could use another browser (I have tested Chrome and Iceweasel) or you could use an entirely different application. In fact, during the holidays last year I setup one of my stations to play a YouTube video of a fireplace. I accomplished this feat of festivity using Omxplayer and Livestreamer.
I hope you use this to improve your real-time visibility into your systems in a cost-effective and easy way. If you have any questions at all, feel free to contact me.