propaganda is a not-very-complicated PHP and Javascript web app for informational display screens
- There is no interface for adding a new Channel at the moment. It'll take me like 5 minutes to do, and yet, I haven't done it. In the meantime, new Channels will need to be added directly through the DB
- The news ticker uses NewsMax for a source, mainly because they have a functional RSS feed. At some point I'd like to have this be changeable option via propagandaConfig.php, but if you want to change it now, go have a look in src/propagandaTicker.php and make changes accordingly
I was using the wonderful Concerto digital signage app to run informational screens at my job, but it was total overkill for our simple setup. Also, I often ran into problems with getting the weather widget to work, getting videos to display, and getting the news ticker going, so I just ended up creating custom iFrames for those things. I am also not a Ruby-on-Rails guy, so when Concerto had issues, I was often confused. Finally, Concerto stopped working in updated browsers and I had extreme difficulty updating the stock Concerto VM image to get it going again.
So I dumped it and built propaganda to take its place.
I'm currently using this for the screens at my job. Here's what it looks like in action:
- A web server that runs PHP7+ (it'll probably run on 5+ but I haven't tested it)
- MariaDB / MySQL
- An OpenWeather API Key (free from openweathermap.org)
- jQuery (currently auto grabs jquery-latest from jquery.com)
- Copy everything in the /src directory to your webroot (/var/www/html, c:/inetpub/wwwroot, etc).
- Run the SQL script (sql/propaganda.sql) to create the propaganda DB and tables.
- Adjust your webserver to require authentication to use stuff in the management folder. For example, here's what I added to my apache2 config file so that my users can use their ActiveDirectory login via LDAP:
#Permissions for the propaganda manager -- ya gotta log in
<Directory "/var/www/html/propaganda/management">
<Files *.php>
Options all
Order deny,allow
AuthName "Login with your work credentials"
AuthType Basic
AuthBasicProvider ldap
LDAPReferrals Off
AuthLDAPUrl ldap://[my domain controller FQDN]/dc=[my domain name],dc=[my domain suffix]?sAMAccountName?sub
AuthLDAPBindDN "[a user that can access the domain]@[my domain]"
AuthLDAPBindPassword "[that user's password]"
AllowOverride None
Require valid-user
</Files>
</Directory>
If your webserver is IIS, you can just set Windows permisssions directly on the propaganda management folder you copied to your webroot.
- Make sure your webserver allows file uploads. Check you php.ini to see if file_uploads is on and upload_max_filesize is set to something reasonable.
- Allow write access to the propagandaUploads folder. For example, on my apache2 server, I had to change the owner of propagandaUploads to www-data, so that propagandaUploads now has these permissions:
drwxr-xr-x www-data www-data
- Edit propagandaConfig.php to setup your MariaDB connection stuff, customize the look and feel, and get the weather working
- Configure your display devices (a Raspberry Pi, for exampe) to load propaganda/propaganda.php in Chromium (I haven't really tested it in other browsers)
A Raspberry Pi works great for this, but any PC that can run Chromium would work (or any web browser, but my setup script assumes a Chrome-based browser). I have included a script in /scripts that will launch propaganda for you in Chromium. I would recommend setting up your Pi to run this script automatically at login.
To do this on an LXDE-based Pi, copy the propagandaStartup.sh script to your home directory (or wherever you want it) and make it executable:
sudo chmod +x /home/pi/propagandaStartup.sh
Next:
sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
And then add this above the @xscreensaver line:
@sh /home/pi/propagandaStartup.sh
NOTE: If Chromium launches with a blank screen, you need to disable hardware acceleration. Goto Settings > Advanced > System and uncheck "Use hardware acceleration when available".