Skip to content
This repository was archived by the owner on Sep 23, 2020. It is now read-only.

Client installation instructions

lamikae edited this page Nov 4, 2012 · 11 revisions

Background information

These instructions are based on Ubuntu, but may also apply to other operating systems.

Software requirements

  • Python >= 2.6
  • PySide >= 1.0.0 (>= 1.0.7 preferred)
  • Qt >= 4.6

Debian packages

Install following packages from Ubuntu repositories.
The python-pyside meta-package will pull all required Qt packages.

sudo apt-get install python-pyside nodm unclutter

PySide has been included to mainstream Ubuntu repositiories, but pre-2012 releases, you need to enable the PySide community repository.

sudo add-apt-repository ppa:pyside
sudo apt-get update

Build and install the client debian package. It is architecture independent.

sudo apt-get install python-stdeb debhelper
cd iivari/client
make deb
sudo dpkg -i deb_dist/iivari-client_<version>.deb

Setup

Iivari client can be configured via JSON formatted rc file.
Configure the proper server address.

#
# Iivari client settings
# Place this file to either ~/.iivarirc or /etc/iivarirc
#
{
    # Server base URL
    "SERVER_BASE" : "http://localhost:3000/conductor",

    # Logger level -- FATAL, WARN, INFO, DEBUG
    "LOG_LEVEL"   : "INFO",

    # Use shell color codes in log files? -- True, False
    "LOG_COLORS"  : "True"
}

Quickstart

Start the infotv slideshow:

iivari-kiosk

You may optionally specify client hostname and screen resolution as input parameters. An interactive JavaScript console is also available. For usage, see iivari-kiosk --help.

NOTE: some built-in features will intentionally kill the client process.
This is for the OS to prevent possible memory leaks and workaround some Qt bugs.

This leaves a requirement for a watchdog process restarting the client when it exits.

Client startup configuration

NOTE: these instructions are outdated

Create borwser startup script

sudo nano /usr/local/bin/start_infotv
#!/bin/sh
export DISPLAY=:0.0
xset s reset
xset s 0 0
xset s off
xset s noblank
xset dpms 0 0 0
xset -dpms
xset dpms force on

metacity &
unclutter -idle 1 -root &

sed -i 's/"exited_cleanly": false/"exited_cleanly": true/' \
        ~/.config/chromium/Default/Preferences

CACHE=~/.config/chromium/Default/Application\ Cache/Index
CHROMIUM="chromium-browser --no-first-run --kiosk"
SIZE=$(xdpyinfo | grep 'dimensions:' | awk '{ print $2 }')
URL="https://example.com/infotv/conductor?resolution=$SIZE&hostname=infotv01"

if ! [ -e "$CACHE" ]; then
  # run first to setup the cache, edit it later
  $CHROMIUM "$URL" &
  sleep 50
  exit
fi

echo "delete from quota;" | sqlite3 "$CACHE"
echo "insert into quota values ('https://example.com/', 1000000000);" \
  | sqlite3 "$CACHE"

$CHROMIUM "$URL"

Add executable permissions

sudo chmod +x /usr/local/bin/start_infotv

Create new Desktop

sudo nano /usr/share/xsessions/infotv.desktop
[Desktop Entry]
Encoding=UTF-8
Name=infotv
Comment=Info-TV
Exec=start_infotv
TryExec=start_infotv
Icon=
Type=Application
X-Ubuntu-Gettext-Domain=gdm

Setup gdm default login as infotv

adduser infotv
sudo nano /etc/gdm/custom.conf
[daemon]
TimedLoginEnable=false
AutomaticLoginEnable=true
TimedLogin=infotv
AutomaticLogin=infotv
TimedLoginDelay=30
DefaultSession=infotv

Reboot system or restart gdm and client is prepared

sudo service gdm restart

Clone this wiki locally