• ing.marcoburatto@gmail.com

Yearly Archive June 15, 2021

Raspberry Digital Signage plugins

RASPBERRY DIGITAL SIGNAGE

About | Download | Donation | Docs | FAQ | Changelog | Plugins | Signage Orchestrator

Available plugins: Web Kiosk | WordPress | MagicMirror²



Web Kiosk “plugin”

You can reactivate the display of the normal Chromium address bar with the following command via SSH as root:

sed -i 's/chromium-browser --kiosk --home-page/chromium-browser --kiosk-placeholder --home-page/g' /rds/home/rds-user/.rds-xinitrc
systemctl restart rds

 
This restores the standard address bar to Raspberry Digital Signage and tunes it in a system suitable for usage in web kiosks and multi-user web workstations environments (cafès, offices, schools, hotels, hospitals, libraries), where people can freely surf the web.

Raspberry Digital Signage with this “plugin” replaces the older Raspberry WebKiosk.

Revert with:

sed -i 's/chromium-browser --kiosk-placeholder --home-page/chromium-browser --kiosk --home-page/g' /rds/home/rds-user/.rds-xinitrc
systemctl restart rds

 



WordPress plugin

Raspberry Digital Signage admin interface allows you to set up the URL of the web resource to be displayed; it can be an Internet one (https://www.binaryemotions.com), a LAN URL (http://192.168.1.100/booking; http://booking.lan), or even a resource located internally, inside the Raspberry Pi’s filesystem. You know that already.

To simplify the creation/management of an internal site setup, the wordpress plugin adds a WordPress installation to the system (/rds/var/www/wordpress).

 

Plugin installation
From a SSH terminal of Raspberry Digital Signage v. 21.0+ (donors’), as root:

apt update
cd /root
wget https://www.binaryemotions.com/rds.plugins/raspberry-digital-signage-plugin-wordpress-21.0-1_all.deb
apt install -y /root/raspberry-digital-signage-plugin-wordpress-*.deb

 

Prerequisites
In order to view (and administer) the Pi’s WordPress site from your PC, just add the following line to your PC hosts file:

RaspberryPi_LAN_IP_in_this_moment wordpress

For example:

192.168.0.120 wordpress

This way, your PC will identify the URL http://wordpress as coming from the Pi.
Google for what “hosts” file means if unsure.

 

Usage
Set up your site on the internal WordPress installation: as a normal WordPress site, by browsing from your PC to http://wordpress.

WordPress admin (http://wordpress/wp-admin/) login is: admin / password.
Remember to change it. Binaryemotions won’t give basis/informations on how to use WordPress.

Make Raspberry Digital Signage display it: from the admin interface, set http://wordpress as the kiosk URL (the plugin’s installation will do it for you, but if you change it, then remember to set up this way).

Since the provided build of WordPress is of course outdated when you will install it, an advised preliminary step is to update it. Also, don’t worry if the home page results not found: just update that fkg WordPress 🙂
After having updated it, just reboot Raspberry Digital Signage (via SSH) or force a kiosk restart via the usual admin interface (/settings).

 

Disable network check
Upon boot, the system checks for the availability of the network, in order to display the proper admin interface if no network is available. However, with an internal WordPress installation, the network check could be undesired: in case, modify /rds/home/rds-user/.rds-xinitrc as:

function System_connectionCheck() {
    return 0
}

 

Useful things to do with this WordPress installation
Many. Among the others, a plugin which is worth a try is foyer.tv.
Install it from WordPress plugins page, then create a presentation and put its link in the Raspberry Digital Signage admin interface as the kiosk URL.

 

Uninstallation

apt --purge remove -y raspberry-digital-signage-plugin-wordpress
rm -R /rds/var/www/wordpress/wp-content
apt --purge autoremove -y

 



A MagicMirror² for Raspberry Pi plugin

MagicMirror² is an open source modular smart mirror platform. With a growing list of installable modules, the MagicMirror² allows you to convert your hallway or bathroom mirror into your personal assistant. MagicMirror² is the winner in the official Raspberry Pi magazine’s 50th issue celebration feature voted by the Raspberry Pi community.

This plugin installs in a few steps the MagicMirror² project on top of Raspberry Digital Signage. Code is built by the creator of the original MagicMirror with the incredible help of a growing community of contributors. Please consider a donation for them if you make use of it.

Quite cool actually.

 

Requirements
This plugin requires at least Raspberry Digital Signage v.18.

 

Plugin installation
From a SSH terminal of Raspberry Digital Signage (donors’), as root:

curl --silent https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo apt-key add -
echo "deb https://deb.nodesource.com/node_16.x buster main" > /etc/apt/sources.list.d/nodesource.list
echo "deb-src https://deb.nodesource.com/node_16.x buster main" >> /etc/apt/sources.list.d/nodesource.list
apt update
wget https://www.binaryemotions.com/rds.plugins/raspberry-digital-signage-plugin-magicmirror-18.3-1_all.deb
apt install -y ./raspberry-digital-signage-plugin-magicmirror-*.deb
apt install -y npm

 

Customizing
Please see the official documentation.
Config file is located in /rds/home/rds-user/MagicMirror/. Once you modify the config file, restart the signage stack: systemctl restart rds.

 

Uninstallation

apt --purge remove -y raspberry-digital-signage-plugin-magicmirror
apt --purge autoremove -y

Raspberry Digital Signage changelog

RASPBERRY DIGITAL SIGNAGE

About | Download | Donation | Docs | FAQ | Changelog | Plugins | Signage Orchestrator

Version 21.0

The underlying base system has been updated to the latest Raspberry Pi OS Lite, v.12, Bookworm with Chromium 130.

 

Version 20.2

Rebased (not only updated) on latest Raspberry Pi OS Lite, v.12, Bookworm, so Raspberry Pi 5 compatible.

 

Version 20.0

The underlying base system has been updated to the latest Raspberry Pi OS Lite, v.12, Bookworm.

 

Version 19.0

The underlying base system has been updated to the latest Raspberry Pi OS Lite, v.11, Bullseye with Chromium 113.

 

Version 18.3

Moving back to Buster (which sounds good also for a movie name): Raspberry Pi OS Bullseye 32 bit is giving some users a lot of troubles with shared libs and other binaries, as of now, so the Raspberry Digital Signage stack of v18.2 is back-ported to a Buster system. Next time, next try.

 

Version 18.0

  • Chromium settings persistence logic more intuitive;
  • the virtual keyboard extension is now disabled by default;
  • underlying base system has been updated to the latest Raspberry Pi OS Lite, v.11, Bullseye. Chromium 98 and rpi-chromium-mods 20220111 packages are amongst the others.

Thanks to Stefan de Vries’ feedback, I noticed an obscure problem with X.Org not starting on Pi 3 (maybe the never ending pain in the ass regarding the rootless X run), while, curiously, on Pi 4 it has no problems. A fix has been issued with v.18.2.

 

Version 17.0

  • Chromium settings persistence logic changed: browser is kept back to default settings or last-persisted settings only when user asks for and not upon every reboot (maybe a more balanced behavior in regard to security vs. user experience);
  • settable DPI feature returns to work (the feature has been removed in the latest builds for some issues of the underlying OS);
  • a new, better, virtual keyboard extension has been installed by default;
  • lowercase URLs issue fixed;
  • system has been updated to the latest Raspberry Pi OS Lite – this contains important security fixes. Chromium 92 and rpi-chromium-mods 20210212 packages are amongst the others.

In memory of my father Giovanni, 2021-12-13.

 

Version 16.0

  • REST JSON API finally added. The REST API is the foundation upon which to build a central interface (or orchestration scripts as well) to command all your displays;
  • compatibility mode added. Kiosk URL is usually loaded within an iframe in order to take advantage of the refresh and scheduling [to be done] features. However, some resources refuse to run within browser iframes (even setting the browser to ignore the X-Frame-Options HTTP response header).
    In this case, with the Compatibility mode resource will be loaded as a ‘normal’ page, but of course the aforementioned features won’t work.

 

Version 15.0

  • frontend rewritten and improved (legacy technologies for speed, modern best practices);
  • the browser now loads the digital signage URL dynamically as the configuration file changes – and not upon start only; this is the base for managing many Pis from a central interface, which is a (future) use case many users ask for;
  • Chromium now makes full use of the GPU – HTML5 videos and modern CSS effects play a lot better (thanks to Ciprian Rusu’s and Diego Vega’s feedbacks);
  • Wi-Fi 802.11 networking fixed (networks’ display);
  • system has been updated to the latest Raspberry Pi OS Lite (formerly known as Raspbian Lite), with Chromium 88.

 

Version 14.0

  • Screen rotation management completely modified, now it’s up to X.Org, for /boot/config.txt options are getting useless. This was the real big issue of the past build. Thanks to Shawn Gants for the hints;
  • audio fixed, thanks to Michal Maruška and Paul Thurn. Oh yes, this too was annoying;
  • mouse-pointer-always-disabled setting returns to work (useful for touchscreens). The Matchbox window manager flag seems not to be supported any more, so now Raspberry Digital Signage is using the proper flag when launching X.Org via xinit;
  • Chrome auto-starts videos by default (newer Chromium builds refuse to autostart HTML5 videos on page load, otherwise);
  • enabled ping for monitoring, thanks to Daniel Miranda for the feedback;
  • better open networks handling added;
  • system has been updated to the latest Raspberry Pi OS Lite (formerly known as Raspbian Lite), with Chromium 86 and rpi-chromium-mods 20201213 packages amongst the others.

 

Version 13.2

  • DPI settable. This is of course useful for HiDPI screens;
  • Chromium issue fix.

 

Version 13.1

  • Plugins-ready;
  • New Address Bar removed (because…) tabtiles fixed (and so used as an address bar, too);
  • a couple of other fixes;
  • operating system updated.

 

Version 13.0

  • PHP/Bash backend completely rewritten and vastly improved – please see docs;
  • security much much (much) enhanced;
  • the Raspberry Digital Signage stack is now a standard Debian package;
  • the default virtual keyboard has moved from the very basic one embedded in the window manager to a Chromium extension (Virtual keyboard – nomen omen..);
  • Chrome extensions added by default to the system (Scrollbar Customizer, tabtiles, URL Slideshow);
  • the New Address Bar Chrome extension is used for miming a web-kiosk-oriented system;
  • user interface refactored;
  • boot spash;
  • many fixes (amongst them: token/mac address);
  • underlying operating system updated to the most recent Raspbian Buster Lite. Chromium browser version is now v.78;
  • documentation finally created 😉
  • internal WordPress installation has been removed – will be packaged separately as a standard Debian .deb package.

 

Version 12.1

  • a Raspberry Pi 4 compatible build, rebuilt with a Raspbian Buster operating system as its foundation. Some bugs have been fixed as well.

 

Version 11.2

  • the underlying operating system has been updated to the latest Raspbian Stretch build, which assures the new Raspberry Pi 3b+ compatibility (raspberrypi-bootloader);
  • Chromium browser (the most important package for this browser-face operating system) has been updated to release 60 (armhf) and rpi-chromium-mods to version 20180409 (armhf);
  • a Systemd unit file now replaces the older SysV init-script for launching the digital signage stack (some code modified to comply with this new logic);
  • MAC address at URL’s end feature fixed;
  • Internal WordPress site viewability fixed.

 

Version 10.0

  • the underlying operating system has been moved to Raspbian Stretch; the overall performance is sensibly better and HTML5 videos play a lot smoother;
  • some improvements on code and bug fixes (the most important ones concern WiFi networks’ discovery and local WordPress virtual host, which remains disabled if unused).

 

Version 9.0

  • underlying operating system updated: raspberrypi-bootloader, apache, php, openssl and xorg packages have been updated, among many others;
  • Chromium browser is now at v.56, bundled with system’s new SSL certificates – needed after the infamous SHA1 collision event for browser’s correct behaviour with “https” sites;
  • Raspberry Pi Zero W compatibility;
  • digital signage page can be retrieved from the Internet, LAN or even from localhost (a www folder inside the Raspberry Pi’s SD card). To simplify the management of the internal site setup, RDS 9.0 comes with WordPress already installed (see FAQ for more);
  • a little more polished UI (official 7″ R-Pi touchscreen view is painless now);
  • more robust prevent-cache technique for Chromium when reloading-web-page hack is enabled (thanks to Marc Giavarra);
  • some minor improvements on code.

 

Version 8.0

  • finally, Adobe Flash Player is available for the Raspberry Pi Chromium browser! OK, it’s not the latest and greatest technology in the bunch, but many users ask for;
  • operating system updated for Raspberry Pi 2B v1.2 compatibility;
  • Ignore X-Frame headers Chromium extension installed, so now it is possible to display Google URLs within frames;
  • some bug fixes and improvements.

 

Version 7.2

  • Chrome 51 which features H264 and AVC video acceleration and gains ARM6 (Raspberry Pi 1 and Zero) compatibility!
  • F1 key added to blacklisted keys list in the kiosk view.

 

Version 7.1

Older Raspberry Digital Signage infrastructure has been ported to the new Raspbian Jessie and now it is compatible with the Raspberry Pi 3 boards. So the system has been built from scratch since v1.0.

Write instructions

WRITE INSTRUCTIONS

How to write the operating system’s .img file to a micro-SD card (8GB minimum), suitable for booting a Raspberry Pi microcomputer. A good SDHC class 10 card is highly recommended.

1. Extract the .img file from the downloaded ZIP archive.

2. Write the image by the use of Etcher. Make use of a micro-SD to USB key adapter for the write process.

Raspberry Digital Signage on the Pi 4 can also boot from a USB key, so the previous steps can be performed against a USB key instead of a micro-SD card.

Balena Etcher

 

Linux operating system specific
Linux users can also make use of dd.
Run all the following commands as root or with sudo in a terminal emulator:

  • plug the SD card/USB key into your PC;
  • use fdisk -l for locating the device file, for example: /dev/sdx (change for your case);
  • it’s better to unmount the auto-mounted device’s partitions, if any (umount /dev/sdx1, umount /dev/sdx2, …);
  • finally write the image: dd if=path/to/imageFile.img of=/dev/sdx bs=50M
  • please note that the dd command must refer to the whole disk: do not use /dev/sdx1 but /dev/sdx, as an example.

 

First boot

Once you have successfully written the IMG file to the micro-SD/USB key, plug the device into the R-Pi and reboot the microcomputer. When booting from a USB key (Pi 4 only), remove the SD card before.

 

Notes

  • See a coloured square/lighting bolt near the top right corner of the screen? Please have a look at the FAQ.
  • Louis DeRobertis reports that some HDMI to VGA converters do not give enough power to the screen – it will remain blank.
  • Never halt or reboot the Pi by powering it off (some Raspberry Pi boards are reported to be prone to filesystem corruption); use SSH instead (with the halt or reboot commands).

    You can of course schedule a cronjob which will turn off or reboot the Pi gracefully as well.

Download Raspberry Digital Signage

RASPBERRY DIGITAL SIGNAGE

About | Download | Donation | Docs | FAQ | Changelog | Plugins | Signage Orchestrator

rds-21.0-release.zip md5: ae8f61266ee53d95c24e3da9b746f447

Detailed write instructions are available here.
Long story short: you can write Raspberry Digital Signage with Balena Etcher to a micro-SD card or USB key (USB key for Pi 4 only), both of 8GB minimum – exactly as any other operating system for the Pi.

Compatible with all Pis. Raspberry Pi 5 compatible since v.20.2.

 

Full version

This “release” build of Raspberry Digital Signage is limited in functionality: if you like this project please donate.

 

I need to slide media files, not to display a website

For image and video files slideshow, please have a look at Raspberry Slideshow.

 

Docs / I have issues/questions

Just have a look at the documentation and the FAQ page.

Raspberry Digital Signage docs

RASPBERRY DIGITAL SIGNAGE

About | Download | Donation | Docs | FAQ | Changelog | Plugins | Signage Orchestrator

Long story short (wired network/dhcp)

Connect your Pi to a wired network cable and boot; system’s IP address is shown on screen upon boot.
Raspberry Digital Signage boots in full-screen (kiosk) mode displaying the saved web resource. In order to configure the system, browse from your PC to (login: admin / password).

 

Full docs

If no wired/dhcp network is available, Raspberry Digital Signage boots showing the network admin page (default login: admin / password), where you can setup your network connection (wired or wireless), with physical access to the Pi. Once you select a connection method, a reboot will be performed.

If network is available, Raspberry Digital Signage boots in full-screen (kiosk) mode displaying the configured web resource. System’s IP address is shown on screen upon boot. In order to configure the system, browse from your PC to http://<IP_ADDRESS>/settings (default login: admin / password).
Once network is set, administration can/must be performed remotely via browser, without physical access to the Raspberry Pi.

You can always modify Pi’s network connection by browsing from your PC to http://<IP_ADDRESS>/networks.

 

Network admin interface

Self explanatory.

 

Admin interface

Signage settings:

Raspberry Digital Signage admin interface

Admin interface password
This changes the admin interface password, as well as the rds-user password (SSH) and the VNC one all together. Remember to change the default system password at first setup.

 
Kiosk settings
Here you can configure the URL of the web resource displayed by the full-screen browser.

A token (the machine’s MAC address without “:” characters) is transparently added at the very end of the web resource URL, allowing multiple Pis insisting on just one server location, for example: http://yourserver.com?rdstoken=080027fe959b. It’s then up to your server logic sending the appropriate resource to the client, if you need different content for each client to be displayed (1).

A browser full reset after a specified user inactivity feature is available, which will – nomen omen – kill and completely reload the browser.

A reloading of web page content after a specified time is possible as well. Please note that not every site is compatible with this feature (a completely white page means a no-go).

Kiosk URL is loaded by default within an iframe, however some resources refuse to run within browser iframes, even ignoring the X-Frame-Options HTTP response header; again, a white page is a symptom. From v.16 a compatibility mode has been added: by enabling it, the resource will be loaded as a “normal” page.
For example, the DAKboard resource you see in the About page is run with the compatibility mode enabled; some Google resources require the compatibility mode to be turned on as well.

 
Chrome and web page settings
While you can configure the system via the admin page quite completely, when you need to modify browser settings/extensions and page cookies/passwords, a virtual access to the whole Pi’s screen is required.

Browse to the admin settings page via browser and then access the Pi via VNC (default password: password).

At any time you can make a snapshot of the state of your Chromium and pages’ settings (cookies, auth and so on), so that you can restore the browser to last-persisted or default settings at a later stage.

 
Some Chrome extensions are installed by default:

  • Scrollbar Customizer (enabled): with this extension it’s possible to modify the scrollbars’ sizes, thick to hidden. Very thin scrollbars are set as default (2).
  • Virtual keyboard, on-screen virtual keyboard (disabled; enable if needed).
  • tabtiles (disabled). Enable this if you need to display a useful pseudo-navigation menu (if the displayed resource opens window popups).
  • Url slideshow (enabled). Configure it to turn the signage in a slideshow of web sites (check the extension’s options Start on browser start and Fullscreen). Quite cool.

 

System settings:

Raspberry Digital Signage admin interface

Self explanatory.
About the screen rotation, please also see the System screen rotation FAQ on the FAQ page.

 

Kiosk mode

Raspberry Digital Signage boots in full-screen (kiosk) mode displaying the saved web resource with all the saved settings applied; mouse pointer auto-hides in some seconds of inactivity. For security reasons, some keyboard keys are disabled.

You cannot exit to the console in any way except stopping the rds service via SSH.
Please do not hard reboot your Pi while in production.

 

Kiosk mode with visible address bar

Raspberry Digital Signage is designed for digital signage installations – it’s a full-screen browser-face system, you know already. The Web Kiosk “plugin” restores the address bar and tunes the system in a way it can be used for “web workstations” (often found in cafès, offices, schools, hotels, hospitals, libraries), where people can freely surf the web.

 

Using SSH (donors’ build only)

You can SSH into the Pi in order to set up the underlying Raspbian operating system (quite the same as with a standard Debian OS) and configure Raspberry Digital Signage without a GUI as well.

You can perform an SSH login with the following clients:

  • *nix users will make use of the native ssh client – open the terminal emulator and type:
    ssh rds-user@RASPBERRY_IP.
  • Windows users will use Putty, MobaXTerm, any cygwin-derived program or the Linux Subsystem for Windows (preferred; in this case the syntax is identical as the *nix users’).

Use the following default credentails:
user: rds-user
password: password
then, once in, type: sudo -i for administrative rights (root)

When admin screen password is modified, SSH password will be changed accordingly. So, if you set a password for the admin interface, the new SSH password will be identical. This way you can protect both system settings’ modification via browser (admin interface) and via SSH with one step.
Please change the default SSH password for your security.

 

Configure the system via SSH // Backup and restore settings

The following files can be copied onto a new copy of the same version of Raspberry Digital Signage in order to move your settings from an installation to another.

  • Modify the config file of your interest in the /etc/rds/ folder and then restart the Raspberry Digital Signage service: systemctl restart rds. Yes, rds is a standard Systemd unit.
  • For the network, standard /etc/network/interfaces.d/* and /etc/resolv.conf files are used.
  • For locale and keyboard, standard system files /etc/default/locale and /etc/default/keyboard are used.
  • Screen: /etc/X11/xorg.conf.d/resolution.conf (resolution), /rds/home/rds-user/.Xresources (dpi).

Please note that passwords must be set manually using the admin interface.

 

Plugins

See the plugins page.

 

Browsing whitelist

In order to add an internal filtering HTTP proxy with a whitelist behaviour (users allowed to browse only a specific set of sites), use follow the steps.

1. Install tinyproxy via apt and change its config file to include:
FilterURLs On
FilterDefaultDeny Yes
Filter "/etc/tinyproxy/whitelist"

2. Create a whitelist with only the domains that you want the user to browse (when displaying your websites, make sure no resource loading is blocked by the whitelist; use the Chromium’s developer console for the purpose).

3. Set localhost:8888 as the proxy server in the admin interface.

Thanks to Louis DeRobertis.

 

Players’ orchestration

So far, this page refers to one (only) Raspberry Pi unit. A web interface is also available for the purpose to command many units (“players”).

Signage Orchestrator is a central web interface you can use to schedule Raspberry Digital Signage players to display URLs in a calendar-based timetable. More information here.

 

JSON interface

A REST JSON API is also available, so any device running Raspberry Digital Signage can be driven via its API interface. Here a Postman collection. A basic auth is used for every call. Easy as pie 😉

 


(1)
   (a) In order to disable sending the token, just comment out the related “method” in /rds/bin/actuators/network/get-mac-address.sh via SSH.
   (b) Because the token is calculated only when the kiosk URL is saved, when cloning a system to many devices the token will be the same for all. A solution could be to update the token based on the MAC address for each boot to be sure it’s always updated (for a trivial example with some lines of code in /etc/rc.local). Thanks to Yannick Dessertenne.

(2) The scroll bar extension seems to work only in compatibility mode or after a page refresh (Reload of web page feature).