Loading Portals

Having installed the Starter Kit enables the possibility to load and display portals on the box. The Starter Kit contains example portals for both Webkit and SVG and this guide describes how to load them.

Install the Example Portals

Begin by locating the example portals in your unpacked starter kit. They should be archived in two .tgz files, one for Webkit and one for SVG, placed in the toi_js folder. The names of the archives are toijs-c2-[webkit/svg]_[release name].[revision].tgz. An example would be toijs-v2-webkit_trunk.201640.tgz.

You need a running web server to serve the portals from. This guide assumes you have Apache installed on your server and that the document root directory is /var/www/html.

Begin by unpacking the appropriate portal archive to your document root directory. Example:

cd /var/www/html
tar xf [SDK directory]/toi_js/toijs-v2-webkit_trunk.201640.tgz

Check that your Apache server is running. If it is not, start it:

sudo service httpd start

Verify that Apache is running by using your browser to surf to 127.0.0.1 or the IP of the machine which you are using as web server. If it is not running, consult the manual of your web server to get it running.

Load the Example Portals on the STB

Once the example portals have been installed on your web server it is time to load them on your STB. Begin by establishing a telnet connection to your box. Once the connection is established, you need to use the command line interface to verify certain settings.

The STB stores settings in so-called information objects, which can be retrieved, inspected and modified with the toish command. Of particular interest are the proxylist and whitelisturls objects. These are determined by your infocast server, but their values can be temporarily modified in runtime.

To retrieve the values of the proxylist and whitelisturls objects, enter the following commands in your telnet command prompt:

# toish GetObject cfg.portal.proxylist

# toish GetObject cfg.portal.whitelisturls

The proxylist may be empty if you are not using a proxy. Otherwise, refer to the chapter on proxylist.

The whitelisturls, however, need to contain an entry with the IP or hostname of your webserver. If you have not already done so, refer to the chapter on whitelisturls for information of how to configure this information object.

There is also a convenient way to temporarily add an entry to whitelisturls temporarily. This is done by adding a parameter named "whitelist" to the LoadUri command which loads a particular URL. The examples below illustrates how to do that for a Webkit and SVG bootimage, respectively. Note the different URLs, which assume the example portals have been unpacked as-is, and MIME types.

# toish LoadUri [HOSTNAME]/toijs-v2-webkit/index.html text/html whitelist
# toish LoadUri [HOSTNAME]/toijs-v2-svg/index.svg image/svg+xml whitelist

At this point, the test portals should be visible on the STB.