Raspberry Pi Public Display - broadcast messages and information for students, lecturers, teachers, staff and visitors
Version 14.3.21
Start -- Bug in Raspberry Pi OS 32 bit buster and impress (14.4.21):
Impress slide show stop working after some minutes.
https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=248757
Raspberry stretch and OS 64 bit are correctly working!
My workaround is to use the program okular
https://okular.kde.org/
Therefor I save my Impress or PowerPoint presentation as PDF.
In Okular I can start the pdf as "presentation".
In the settings of okular I give 15 sec from one slide to the next and loop the presentation.
A second workaround is to keep the impress presentation and run a script file with
DISPLAY=:0 xdotool key space
This is like pressing the keyboard the space key.
Therefor install xdotool.
The script is permanently running.
refresh_key_space.sh:
#!/bin/bash
# sleep and then press space
# for Impress when slide freeze
while true
do
DISPLAY=:0 xdotool key space
sleep 5m
done
Add this line to /etc/xdg/lxsession/LXDE-pi/autostart
/home/pi/Desktop/refresh_key_space.sh
End --- Bug in Raspberry Pi OS 32 bit buster and impress
Raspberry Pi Public Display
The monitor is set up in the main entrance of our institute.
The upcoming lectures and events are displayed on the monitor.
I use a Raspberry Pi linked with hdmi-caple to the monitor. The Raspberry Pi is connected by cable to the Ethernet.
I use LibreOffice Impress to show the slides.
With SSH and WinSCP I copy new "presentation.odp" files to the desktop and start the presentation in Impress.
For this I have two batch files that end and restart the presentation.
Raspberry Pi 3 Model B
Display Monitor Nec Public Display V423, 42 Zoll
https://www.linuxmuster.net/wiki/anwenderwiki:infoboard:raspberry-pi
https://www.andysblog.de/raspberry-pi-2-model-b-fuer-praesentationen-verwenden
Install Raspberry Pi OS
Use at least 8 GB SD Card. I used a 32 GB microSDHC Card from ScanDisk.Connect the card with SD-Card Adapter to a Ubuntu 16.04 PC.
Download the latest Raspberry Pi OS Software for the Raspberry Pi.
Use the .zip-file.
https://www.raspberrypi.org/downloads/
To transfer the Raspberry Pi OS to the SD card I used Etcher
How to install Raspberry Pi OS:
https://www.raspberrypi.org/documentation/installation/installing-images/README.md
Etcher
https://etcher.io/
Simply dopple click to the downloaded file in Ubuntu, Etcher will start.
Raspberry Pi OS is now on the SD card.
Configure Raspberry Pi OS for the public display
Raspberry Pi OS has already installed LibreOffice. I used Impress to show the presentation on the public display.If not you can easily install LibreOffice.
sudo apt-get install libreoffice
But first I had to configure the Raspberry Pi OS.
1. Static IP instead of DHCP
To connect to the Raspberry remote I use SSH with static IP.
Configure the interfaces:
sudo nano /etc/network/interfaces
Type in the following text:
auto eth0
iface eth0 inet static
address x.x.x.x
netmask 255.255.254.0
gateway x.x.x.x
dns.nameservers 134.2.200.1 134.2.200.2
Restart the network with
sudo /etc/init.d/networking restart
2. Change Password
To change the password go tosudo raspi-config
1 Change User Password
3. SSH
To activate SSH simply go tosudo raspi-config
5 Interfacing Options
SSH
...enable?
Yes
4. Hostname
To change the hostname go tosudo raspi-config
2 Network Options
N1 Hostname
5. Change Autostart
The raspberry should restart without login screen and show the LibreOffice Impress presentation.sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
(In older Raspbian Versions I used the autostart in the pi profile
sudo nano ~/.config/lxsession/LXDE-pi/autostart
)
Make to a comment the following text:
#@xscreensaver -no-splash
#This stopps the screensaver.
@xset s off
@xset -dpms
#To avoid the shutdown of the display
@xset s noblank
#Delete the lock to open the openoffice.
sudo rm -f /home/pi/Desktop/.~lock*
#Open the file presentation.odp in the folder Desktop
soffice --show --norestore /home/pi/Desktop/presentation.odp
6. Manually start and stop presentation with SSH
To start and stop the presentation by SSH, I had to executable files presentation_stop and presentation_start.Create a file presentation_stop with the following text:
#!/bin/bash
sudo pkill soffice.bin
Create a file presentation_start with the following text:
#!/bin/bash
if test -e /home/pi/Desktop/.~lock.praesentation.odp#
then
sudo rm /home/pi/Desktop/.~lock.praesentation.odp#
fi
DISPLAY=:0 libreoffice --nologo --norestore --show /home/pi/Desktop/praesentati$
Make both file executable with chmod +x.
7. Fix the resolution to the Public Display
Normally Raspberry Pi should recognize the resolution of the monitor.In my case not. Therefor I fix the resolution in the config.txt file.
sudo nano /boot/config.txt
Type in the following text:
hdmi_group=2
hdmi_mode=82
hdmi_force_hotplug=1
This force the DMT modus
1920x1080/60Hz (1080p)
and hotplug.
8. Config LibreOffice Presentation
To make the presentation endless and automatically show the next slide configure the presentation.odp with the LiberOffice Impress program.
9. Firewall
I use UFW to allow acces only in my subnet.
https://raspberrypi.stackexchange.com/questions/14381/only-use-raspberry-pi-in-local-network/14477
Install UFW
sudo apt-get install ufw
deny all incoming connetions
sudo ufw default deny
allow the local network connections (subnet 134.2.54.0 - 134.2.55.254)
sudo ufw allow from 134.2.54.0/23
enable the ufw
sudo ufw enable
check the rules
sudo ufw status verbose
Delete rules
https://pimylifeup.com/configuring-ufw/#ufwdeleterule
sudo ufw status numbered
sudo ufw delete <mumber of the rule>
1 Kommentar:
I am sure this piece of writing has touched all the internet people, its really really good article on building up new website.
Kommentar veröffentlichen