I am working on a project using a Raspberry Pi to host media content for digital signage. The Pi’s was bought as a kit that included the following: a power adapter, a SD card, a WiFi adapter, and an enclosure. The scope of the project requires that multiple displays show the same content synchronously. To obtain this, we will use a VNC server on a lead Pi, and VNC clients on the others. We are to use LibreOffice to display a ODP file to display the desired information in a loop. For getting the file to the Pi, we will use VSFTP.
Getting ready
First, we unbox everything and assemble the Pi’s into pretty little boxes. Then, we installed Raspbian, a Debian Linux derivative specifically designed for the Pi. Using the raspi-config, we set the Pi up for our internationalization settings, time, enabled SSH (a CLI remote connection) server, and to automatically start in X, the graphical environment for Linux. We installed the WiFi adapter and configured it for the network.
Installing the Software
Using aptitude, we installed desired software. The packages we used were: libreoffice (metapackage for the whole suite), vsftpd, x11vnc, and xscreensaver. The first thing we have to do is to get it to stop from entering sleep mode. This is why we installed xscreensaver. Go to Menu => Preferences => Screensaver. Select “Disable Screen Saver” from the Mode drop-down menu. Next is to configure the FTP server. Using your preferred method of text editing (with sudo access) edit the file /etc/vsftpd (I used LXterminal and used the command sudo nano /etc/vsftpd.conf). Using the default file as a template, we set anonymous_enable=NO, local_enable=YES, and write_enable=YES. We can restart the FTP server with sudo /etc/init.d/vsftpd restart. Now we can log into /home/pi through FTP using the username pi and your password (default raspberry). Our next step will be to configure the VNC service. I will need to review how I got this to work, it was one of the more troublesome aspects of the task.
The final step is to configure LibreOffice to automatically run a specified file. Create a folder in our home folder (/home/pi) called digitalsign. We will use this to put the presentation in. Create/edit ~/.config/lxsession/LXDE-pi/autorun. Add the line @libreoffice -view -show ~/digitalsign/index.odp –nologo –norestore –nolockcheck. The view option creates a temporary copy and opens in read-only mode, which will allow for editing while running (although with the setup, a reboot will be required to display the changes). The show option opens and runs the presentation. nologo starts LibreOffice without the splash screen. norestore will keep LibreOffice from complaining that it has a document that needs restored due to a bad closing; Since this device will basically just be turned off and on, it is likely to happen, but the view option means we’re just using a read-only copy so the document needing to be “restored” is unimportant. nolockcheck will keep LibreOffice from complaining that someone else is using it (or it’s file) which the reasons for using this is similar to the norestore option.
Now we can create our presentation and upload it to our Pi as digitalsign/index.odp. Restart the Pi, and it should automatically start the presentation. When we want to update the sign, create a new index.odp and overwrite the existing one, then restart your Pi.
Moving Ahead
The other step is setting up X11vnc, which is one of the few VNC servers that duplicate the active desktop; Most VNC servers in Linux create new virtual desktops to share. After we have this done, we will attempt to implement SSH tunneling for security.
Problems Encountered
The router prevented wireless connections from connecting to other devices. This is a feature of the built-in firewall to prevent different wireless hacker attacks, but hinders our ability to run a server off the wireless.
An update to the Raspbian desktop lxpanel hid the previous WiFi connection tool and uses a new one. The new one seems to have compatibility issues with certain chipsets. I had to find the desktop shortcut for the old one and edit it to remove the hidden option so that it is still available, should I need it.
I had intended to use SaMBa to create a network share for dropping in the presentation, but ran into an issue. I had configured SaMBa servers previously, but could not get this one to give access. Thus I switched to using a FTP server.
I initially wanted to use PowerPoint format, but I could not get it save the loop feature in LibreOffice.