pids - Digital Signage for the Raspberry Pi
What is this?
pids has been tested on both the Model 2B and Model 3B devices.
- Download the latest image from https://pids.nsnw.ca/
- Uncompress and write the image to an SD card
- Plug in a USB storage device (such as a USB key) into a Pi, and boot it off the SD card
- Watch your image slideshow
NOTE: This is pretty alpha quality. It works, but I take no responsibility for any pain, suffering, destruction and/or disaster that may happen as a result. In particular, the configuration file is simply
sourced from the attached USB device with zero sanity checks.
How does it work?
A small script (pids) runs on boot which does the following:-
- checks for the existence of device at
/dev/sda, assuming it will be a USB storage device.
- checks for the existence of a optional configuration file (
pids.conf) on the USB storage device.
- displays the images (using
fim) on the USB storage device in a loop, and in a random order.
Prebuilt images are available (see https://pids.nsnw.ca/), or you can use the files in this repo to integrate it into your own image. The files are:-
pids- the main pids script
pids-boot.service- unit files for systemd
pids.conf- an example configuration that can be put on a USB storage device
cmdline.txt- modified configuration files that live in
By default, both
pids and the
pids-boot service look for
/usr/local/share/pids respectively. These are shown on boot (by
pids-boot) and when no USB storage device is detected (by
cmdline.txt, do not just copy these to your Pi's
/boot directory. There may be options you have configured differently on your Pi, and this will overwrite them. Neither of these files are required to make pids work - they just set a few options to make it work better:-
disable_overscan=1- this disables the black border around the screen. By default this is set to
0, so if you have problems with the output you can comment this line out.
disable_splash=1- this disables any splash screens that Raspbian might display on boot.
logo.nologo- this disables the Raspberry Pi logo that is displayed at the top of the screen on boot.
consoleblank=0- this disables console blanking, which normally happens after a period of inactivity.
loglevel=1- this configures the boot logging to only show important messages.
vt.global_cursor_default=0- this disables the blinking cursor.
quiet- this quietens a few other things that might otherwise be displayed on boot.
As mentioned above, pids will look for a configuration file on the attached USB storage device. The file it looks for is called
pids.conf, and it will look for it in the root of the USB storage device.
This file can contain a few options:-
INTERVAL, which tells
fimhow long to show each image for, in seconds. The default is 5 seconds.
RANDOM, which tells
fimwhether to randomise the images. The default is 1 (enabling randomisation).
QUIET, which tells
fimwhether to show details about each image. The default is 1 (enabling quiet mode).
DISABLED, which tells
pidsto exit on boot and not run any further. The default is 0 (not disabled).
SSH_KEY, which if specified should be an SSH key in the same format as found in
~/.ssh/authorized_keys. This will be placed into
/home/pi/.ssh/authorized_keyson the Pi to allow login as the
PERSISTENT, which tells
pidsto copy all the data off the USB storage device to allow subsequent reboots to happen without the USB storage device. The default is 0 (don't persist).
URL, which if specified should be a URL pointing to a list of images for
REFRESH, which will cause
pidsto redownload the images from
URLafter the given number of seconds. By default this is not set, which means it will not redownload images until the next reboot.
By default, the
pi user does not have a password set. This is to disable SSH login unless an SSH key is provided using the
SSH_KEY option above. The only exception to this is if there's a problem on boot - for more information see the troubleshooting section below.
At the moment, only
eth0 on the device is used, and it will attempt to configure itself via DHCP. Static network and wireless configuration is not yet supported, but is planned for a future release.
By default, the
pi user does not have a password set. If one is set manually, it will be deleted again the next time the Pi is rebooted. This prevents remote logins as the
pi user unless an SSH key is specified in the
pids.conf file with the
SSH_KEY option. However, if a USB storage device is not connected on boot or there is another problem,
pids will set the password of the
pi user to
pids, allowing SSH login with this password.
pids itself is started on boot by systemd. The
pids-boot service also runs, but much earlier in the boot process, to display the splash screen.
pids is hard-coded to look for
/dev/sda. This means that if you have multiple USB storage devices connected, it will only use the first one.
Bugs, limitations and development
If you have any ideas for features, feel free to open an issue on GitHub and I'll take a look.