The instructions below describe the process of setting up a Raspberry Pi running Raspbian machine to run the TV Display.
Similar to the Linux Mint setup instructions, the instructions below include details for two types of installations, depending on where the TV Display application is hosted.
-
If the display machine will have good network connectivity, the TV Display application can be hosted from a web server running on a different computer. This is best if multiple displays will be used as the configuration can be centralized.
-
If network connectivity will be an issue, or if only one display is needed, the TV Display application can run on the Raspberry Pi itself. There are additional steps to run a local installation, but it's still pretty easy.
-
A Raspberry Pi computer running Raspbian. (See the Raspbian Installation Guide for assistance.)
-
A network connection for the setup process. Once set up, the machine should be able to run offline if the local installation steps are followed.
To ensure things run smoothly, it's best to update all of the software on the computer to it's latest versions.
Important Note: Only type the terminal commands as they appear after the $ symbol.
Open a Terminal, and run:
$ sudo apt-get update
$ sudo apt-get upgradeInstall all available updates.
Some of this software might already be installed.
For example, newer versions of Raspbian have the
chromium and chromium-codecs-ffmpeg-extra packages already.
In the Terminal, run:
$ sudo apt-get install chromium chromium-codecs-ffmpeg
$ sudo apt-get install xscreensaver
$ sudo apt-get install unclutter$ sudo apt-get install geany
$ sudo apt-get install git
$ sudo apt-get install nginx-light
$ sudo apt-get install openjdk-11-jreIf you're installing the TV Display application on another server, documentation is coming, but will be very similar to the steps described below.
The default folder location for nginx on Raspbian is /var/www/html. Go to that directory.
$ cd /var/www/htmlClone the tv-display repository.
/var/www/html $
sudo git clone https://github.com/cityssm/tv-display.gitIf successful, you should now be able to view the welcome configuration by visiting http://localhost/tv-display
If required, clone the tv-display-ssm-public repository as well.
/var/www/html$ sudo git clone https://github.com/cityssm/tv-display-ssm-public.gitMake a directory for the display's custom content.
/var/www/html $
sudo mkdir tv-assets
/var/www/html $
sudo chmod 777 tv-assetsFor help getting started, copy over template-offline.json from the tv-display/config directory.
This template makes it easy to run through three groups of images (imageList content)
while displaying a clock in between.
/var/www/html $
cd tv-assets
/var/www/html/tv-assets $
cp ../tv-display/config/template-offline.json config.jsonFor easier refreshing of the imageList files.json files, download the
FilesJsonGenerator.jar from the cityssm/tv-display-filesJSON repository.
/var/www/html/tv-assets $
wget https://github.com/cityssm/tv-display-filesJSON/raw/master/dist/FilesJsonGenerator.jar
/var/www/html/tv-assets $
wget https://github.com/cityssm/tv-display-filesJSON/raw/master/dist/generateFilesJSON.sh$ mkdir /home/pi/.config/autostart
$ nano /home/pi/.config/autostart/chromium.desktopUsing the nano editor, create a file with the following text.
[Desktop Entry]
Type=Application
Name=Chromium
Exec=chromium-browser http://localhost/tv-display/?config=/tv-assets/config --start-fullscreen --kiosk --incognito --noerrdialogs --disable-translate --no-first-run --fast --fast-start --disable-infobars --password-store=basic
Use Ctrl O to save the file. Use Ctrl X to exit.
In the Raspbian menu under Preferences, look for Screensaver.
Under the "Display Modes" tab, look for the "Mode" dropdown list. Select "Disable Screen Saver".
On restart, the Pi should load up the display with the configuration you copied over. Use Alt F4 to leave the full screen Chromium browser.
Now it's time to start customizing your content with the config.json file.
(Documentation is the works.)
Is there a new feature or bug fix you need for the TV Display application?
Connect the machine to the Internet and open a Terminal. The following command will download the latest code from GitHub.
$ cd /var/www/html/tv-display
/var/www/html/tv-display$ sudo git pull origin masterWhile you're connected to a network, visit the Update Manager application as well to get the latest updates for your machine in general.