Skip to content

Latest commit

 

History

History
165 lines (112 loc) · 5.23 KB

File metadata and controls

165 lines (112 loc) · 5.23 KB

How to Setup a TV Display using Raspbian on a Raspberry Pi

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.

Prerequisites

  • 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.

Update the Pi

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 upgrade

Install all available updates.

Install Additional Software

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

Local Installations Only

$  sudo apt-get install geany
$  sudo apt-get install git
$  sudo apt-get install nginx-light
$  sudo apt-get install openjdk-11-jre

Install and Configure the TV Display Application (Local Installations Only)

If 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/html

Clone the tv-display repository.

/var/www/html $
  sudo git clone https://github.com/cityssm/tv-display.git

If 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.git

Make a directory for the display's custom content.

/var/www/html $
  sudo mkdir tv-assets

/var/www/html $
  sudo chmod 777 tv-assets

For 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.json

For 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

Launch Chromium on Startup

$  mkdir /home/pi/.config/autostart
$  nano /home/pi/.config/autostart/chromium.desktop

Using 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.

Disable the Screensaver

In the Raspbian menu under Preferences, look for Screensaver.

Under the "Display Modes" tab, look for the "Mode" dropdown list. Select "Disable Screen Saver".

Restart the Computer

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

Appendix - Updating the TV Display Application (Local Installations Only)

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 master

While you're connected to a network, visit the Update Manager application as well to get the latest updates for your machine in general.