• ing.marcoburatto@gmail.com

Monthly Archive June 15, 2021

Download Raspberry Digital Signage

RASPBERRY DIGITAL SIGNAGE

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

rds-17.0-release.zip md5: b6f569018db37de00fb3c027c2e550cb

Detailed write instructions are available here.
Long story short: you can write Raspberry Digital Signage as any other operating system for the Pi.

 

Full version

This “release” build of Raspberry Digital Signage is limited is some functionality: if you like this project (and/or need human help on it) 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.

Lampone Pi

LAMPONE PI

An operating system for indestructible Raspberry Pi installations

Lampone Pi is a live Debian GNU/Linux Buster arm64 operating system for the Raspberry Pi microcomputer boards. It’s the only live ISO 9660 operating system for the Pi which can also perform kernel updates. Although it is not affiliated or derived from Raspbian, it’s the homologous of Raspbian Lite (they both derive from Debian), but differently it’s a 64bit live OS. Lampone Pi is at the moment compatible with the Raspberry Pi 3 family.

:: resilient

A Debian GNU/Linux (Buster) derivative with a unique partitioning scheme crafted for maximizing the strength against filesystem corruption: the ISO9660 system partition is read-only by design at filesystem-level. No more of the following…

:: ductile

Persistence partition contains only the diffs from the stock installation; system updates and your data lay there – you can do system backups/snapshots by just copying the files contained within the 4th partition (rw folder).

 

Download the image

Lampone Pi comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.

Download Lampone Pi for the Pi 3 family here (img md5: f49cc0620dbbf705ffcc5c3bd4f9becf).

You can write the image file to a micro-SD card (8GB minimum) as you do with any other Raspberry Pi operating system.

Root password: password (console, ssh).
Network: DHCP by default.

Writeable (persistence) filesystem is 1GB in size for this image.
You can resize it to fill the whole SD card’s space with:
printf "d\n4\nn\np\n\n\nn\nw\n" | fdisk /dev/mmcblk0; sync; sleep 10
resize2fs /dev/mmcblk0p4
reboot

 

Open source

Lampone Pi is a free and open-source software, whose development is hosted on GitHub. Feel free to contribute to the projects.

Technically it’s a Debian arm64 derivative with a unique partitioning scheme crafted for maximizing the strength against filesystem corruption: the ISO9660 system partition (here mmcblk0p2) is read-only by design at filesystem-level. The data persistence partition (here mmcblk0p4) contains only the delta: system updates and your data lay there. mmcblk0p1 is the efi FAT boot partition.

The data partition mounted on top of a read-only system partition makes the resulting operating system resistent to filesystem-corruption. Moreover, you can do complete system backups by just tar-ring only the files contained within that partition.

And why the thrid partition?

The complete “liveng” specification can be found at: liveng.readthedocs.io.

Lampone Pi is a fully functioning operating system, but as of now it’s not fully tuned for the Pi (drivers, GPU acceleration, …): maintainers are needed.

 

Case study: kernel update

Lampone Pi features a read-only ISO 9660 system partition but it’s able to update the kernel, it’s magic heh?

Here a user demonstration.

root@lampone-pi:~# uname -a
Linux lampone-pi 5.5.0-0.bpo.2-arm64 #1 SMP Debian 5.5.17-1~bpo10+1 (2020-04-23) aarch64 GNU/Linuxroot@lampone-pi:~# apt install -y linux-image-5.6.0-0.bpo.2-arm64 linux-headers-5.6.0-0.bpo.2-arm64 -t buster-backports
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following additional packages will be installed:
linux-headers-5.6.0-0.bpo.2-common linux-kbuild-5.6
The following NEW packages will be installed:
linux-headers-5.6.0-0.bpo.2-arm64 linux-headers-5.6.0-0.bpo.2-common linux-image-5.6.0-0.bpo.2-arm64 linux-kbuild-5.6
0 upgraded, 4 newly installed, 0 to remove and 47 not upgraded.
Get:1 http://deb.debian.org/debian buster-backports/main arm64 linux-headers-5.6.0-0.bpo.2-common all 5.6.14-2~bpo10+1 [8420 kB]
Get:2 http://deb.debian.org/debian buster-backports/main arm64 linux-kbuild-5.6 arm64 5.6.14-2~bpo10+1 [360 kB]
Get:3 http://deb.debian.org/debian buster-backports/main arm64 linux-headers-5.6.0-0.bpo.2-arm64 arm64 5.6.14-2~bpo10+1 [594 kB]
Get:4 http://deb.debian.org/debian buster-backports/main arm64 linux-image-5.6.0-0.bpo.2-arm64 arm64 5.6.14-2~bpo10+1 [44.4 MB]
Fetched 53.8 MB in 12s (4406 kB/s)
[…]
/etc/kernel/postinst.d/initramfs-tools:
mount: /tmp/_resilientlinux: WARNING: device write-protected, mounted read-only.
update-initramfs: Generating /boot/initrd.img-5.6.0-0.bpo.2-arm64
live-boot: core filesystems devices utils udev blockdev dns.
xorriso 1.5.0 : RockRidge filesystem manipulator, libburnia project.

Drive current: -outdev ‘stdio:/dev/mmcblk0p3’
Media current: stdio file, overwriteable
Media status : is blank
Media summary: 0 sessions, 0 data blocks, 0 data, 256m free
xorriso : WARNING : -volid text does not comply to ISO 9660 / ECMA 119 rules
Added to ISO image: directory ‘/’=’/boot/temp’
xorriso : UPDATE : 3 files added in 1 seconds
xorriso : UPDATE : 3 files added in 1 seconds
xorriso : UPDATE : 13.56% done
xorriso : UPDATE : Thank you for being patient. Working since 12 seconds.
ISO image produced: 38943 sectors
Written to medium : 38943 sectors at LBA 0
Writing to ‘stdio:/dev/mmcblk0p3’ completed successfully.
Setting up linux-headers-5.6.0-0.bpo.2-arm64 (5.6.14-2~bpo10+1) …

root@lampone-pi:~# reboot

root@lampone-pi:~# uname -a
Linux lampone-pi 5.6.0-0.bpo.2-arm64 #1 SMP Debian 5.6.14-2~bpo10+1 (2020-06-09) aarch64 GNU/Linux

As you can see, at every kernel update the third small partition is overwritten. The GRUB bootloader is instructed to boot by default from this partition, because that one always contains the most updated kernel and initrd files.

The second partition’s files are kept at their default state and can be useful in case of recovery or when a complete persistence reset is performed; the big filesystem.squashfs file is saved within this partition so it isn’t touched during kernel updates.

 

Usage example

Here the Raspberry Digital Signage stack is deployed onto a Lampone Pi operating system instead of using the Raspberry Pi Os/Raspbian backend (showing the Resilient Linux website). This build is not available for download, but it’s a “research” operating system.

 

Lampone Pi is a fully functioning operating system, but as of now it’s not fully tuned for the Pi (drivers, GPU acceleration, …): maintainers are needed.

Raspberry Digital Signage and Raspberry Slideshow are still based on Raspberry Pi OS (formerly Raspbian).

Raspberry Digital Signage docs

RASPBERRY DIGITAL SIGNAGE

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

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.

If you need to apply any modification from the vanilla system, correct steps are: 1. make the modifications you need to the browser and/or the web resource; 2. take a snapshot and restore from it; 3. from now on every other modification you apply to the system won’t be cleared upon restart/reboot. At any time you can revert to the last saved snapshot or the default settings. Behavior in v.17 obsoletes the older one.

 
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 (enabled; just remove if you don’t need it).
  • 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.

 

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.

 

Multi-display / REST JSON interface

A REST JSON API is available, so any device running Raspberry Digital Signage can be driven via its API interface. The REST API allows you to command all your displays from a centralized management interface or scripts of your own (not provided here).
Here a Postman collection. A basic auth is used for every call. Easy as pie 😉

 

Screen shows black borders or displays wrongly [alias: how to do 1080p]

Modify /boot/config.txt file this way:

disable_overscan=1
hdmi_group=1 OR hdmi_group=2
hdmi_mode=16 OR hdmi_mode=82

Refer to the official documentation for more.

Use sudo mc -e /boot/config.txt or sudo nano /boot/config.txt via SSH or insert the SD card into a PC running Linux and use a common text editor.

Thanks to Mark van der Linden, Brunner Armin, Guilherme Simões, Teemu Valkeapää and René Lenga.

 


(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).