Raspberry Pi: Digital Signage

IMG_0251

I recently ordered a Raspberry Pi model A+ for a solar powered irrigation project (motion activated cat deterrent with video capture). I cannot believe how small this unit is and how little power it consumes. And at £15 from Curry’s, how cheap it is either.

Side by Side with the Model B

Side by Side with the Model B

While I have not yet got all the components together for the irrigation system I thought I’d use it for another project.

While I was at work the other day I noticed that the digital signage had failed. The screens had frozen and no longer producing a slideshow of all the tasty goods we sell. The system is really old, a desktop computer hidden in the faux ceiling running a basic slideshow. I thought this would be a really good project for the raspberry pi.

My first thought would be to find a free open-source digital signage solution. However nothing really suited my needs. The two I tried first were ‘Screenly‘ and ‘Raspberry Pi Digital Signage‘. Unfortunately the free versions included watermarks that encouraged you to upgrade in order to get rid of. Or the functionality was so limited that it was unusable.

However, I did find a solution that used Linux’s own image viewer ‘Qiv’ that has slideshow functionality. Really this was from a digital photo frame project. But it works fine for digital signage as well. Most importantly, you can run it from the command line, meaning you can automatically start it when the Raspberry Pi boots up.

For those of you who are interested I have included the instructions below.

Top Tip: It helps to program the SD card in a Model B with ethernet before transferring the card to the Model A+. While the A+ is smaller, it only has one usb slot and no ethernet controller. If you don’t have another Raspberry Pi, you can still perform this operation, but you’ll need to set up the Pi first with a wifi dongle, and then SSH into the Raspberry Pi.

Digital Signage / Picture Frame Instructions

  1. First install Raspbian as described in the installation instructions or via NOOBS
  2. Log in (username: pi, password: raspberry) and run the following commands to ensure the packages are up to date.
    1. sudo apt-get update
    2. sudo apt-get upgrade
    3. sudo apt-get autoremove
  3. Now we need to install the image viewer ‘Qiv’. You can do this by running.
    1. sudo apt-get install qiv
  4. Now create a directory in the home directory of the default user (in this case it’s ‘pi’.
    1. mkdir ~/slides
  5. You can now populate the directory with the pictures you want.
  6. To test the slideshow you simply run qiv from the command line.
    1. qiv -fmisd 10 /home/pi/slides/*.*
  7. When you run the program on the Raspberry Pi for long periods, the screen saver will turn on. To deactivate this you can edit the configuration file: /etc/lightdm/lightdm.conf
    1. Find the line #xserver-command uncomment it and replace it with xserver-command=X -s 0 -dpms
  8. Now we need to start the program when the Raspberry Pi boots. To do this we need to edit the global LXDE autostart file: /etc/xdg/lxsession/LXDE-pi/autostart
    1. Add the following line
    2. @qiv -fmisd 10 /home/pi/slides/*.*
  9. Finally reboot and it should start automatically.
    1.  sudo shutdown -r now
  10. If it works how you want it simply transfer the SD card to the Raspberry Pi Model A+ and you’re good to go.

Notes:

I would also recommend making an image copy of the SD card so that you can copy the setup to multiple Raspberry Pi’s.

If the images are not displaying the way you like, you can add zooming to the qiv command.

  • @qiv -fmisd 10 -W 10 /home/pi/slides/*.*
  • -W being the fixed-zoom option, and 110 meaning 110%.

More options can be found on the Qiv program on their homepage.

Limitations:

The qiv program has its own limitations. For example, the main feature I thought was missing from this project was auto scaling of the pictures. You’ll find the images don’t scale to fit the full screen. If your images are more widescreen and your monitor is more square, then you’ll have borders at the top and bottom. The work around is to add the zoom option to the qiv command. Or manually crop the images.

Thats it! Go forth my friends, and share your beautiful pictures with passers by.

Comments are closed.

Powered by WordPress. Designed by Woo Themes