The most common way to display a web page in Polywall is to use a "Web source" source in Polywall Designer interface. In this case a web page will be rendered with a built-in Chromium-based browser. Though the vast majority of web sites are compatible with Chromium, some of them are not. In this and some other cases it is beneficial to use an "Application" source in Polywall to launch a third party browser to display a specific web page. This option is available in Polywall Pro version only.


This article describes how to use some well-known web browsers as a video source for Polywall.


Internet Explorer


A typical recommended command to launch Internet Explorer as an "Application" source is:


"C:\Program Files\internet explorer\iexplore.exe" -noframemerging -k "<url>"


The command-line parameters are:


-noframemerging is used to prevent Internet Explorer from opportunistically merging to other running iexplore processes and run as a child of Polywall Visualizer process.

-k stands for 'kiosk mode' used to hide browser user interface.

"<url>" is a web page URL.


P.S. It should be \Program Files\, not \Program Files (x86)\


Mozilla Firefox


Launching Firefox as an application source is rather tricky although not impossible. There are three issues to be solved while launching Firefox in Polywall:

* Firefox has no out of the box command-line parameters to be executed as separate process and will always try to find an existing Firefox process to merge in.

* Firefox has no out of the box way to run in full screen mode on startup and hide UI (similar to IE's 'kiosk mode')

* Firefox has a complicated inner process structure, especially if 'Multiprocess Firefox' aka 'E10s' is enabled and there has to be a way to prevent it from crashes when Polywall terminates a process.


Creating profiles


As Firefox will not create a separate process for a web page, each page that is going to be displayed in Polywall needs to be run in a separate Firefox profile.


To add a profile type in console:


"<path to firefox.exe>\firefox.exe" -no-remote -P


Create as much profiles as needed in an appeared window, a separate profile for every web page that is going to be displayed in Polywall. In this tutorial the profile names used are profile1, profile2, etc, though any names may be chosen.


Creating Polywall sources


For each web page a separate "Application" source has to be created as follows:


"<path to firefox.exe>\firefox.exe" -no-remote -p profile1 <url1>

"<path to firefox.exe>\firefox.exe" -no-remote -p profile2 <url2>


The command-line parameters are:


-no-remote prevents Firefox to communicate with other running firefox instances

-p <profile> launches Firefox instances with separate user profiles created above, as it is impossible to launch several instances of firefox with one profile

<url> is a web page URL


Configuring Firefox


As mentioned above Firefox has to be properly configured to run correctly without crashes in Polywall.


The Firefox settings are available under Firefox configuration editor, which can be accessed by typing about:config in the address bar. Please note, that all of the following settings have to be configured for each user profile separately in a Firefox session invoked with -no-remote -p <profile> parameters.


 The recommended settings are:


browser.tabs.remote.autostart      false

browser.tabs.remote.autostart.2    false


These two options disable 'Multiprocess Firefox' aka E10s.


browser.sessionstore.resume_from_crash   false

toolkit.startup.max_resumed_crashes      -1


These two options prevent Firefox crash recovery dialog, as Firefox considers the termination from outside as a crash.


Running in full screen mode


Modern releases of Firefox no longer provide any command-line parameters to run in full screen mode on startup. The recommended way to achieve it is to install a third-party plug-in for Firefox, such as R-Kiosk.


If installing third-party plug-ins is not desirable, there is a workaround to launch Firefox in full screen mode (without UI), though it may render unstable and is not recommended. To do it manually edit xulstore.json files located in Firefox profile folders (each of them).


Once opened xulstore.json file in an editor locate "sizemode":"normal" string and change it to "sizemode":"fullscreen". Please note, that Firefox sometimes may overwrite the xulstore.json file after a session, therefore the described method is unstable.


There are also two extra options to prevent animations when switching to full screen mode:


browser.fullscreen.animate     false

browser.fullscreen.autohide    true


Both can be found in about:config editor.


Compatibility (Updated 23.03.2018)


This solution was tested with Mozilla Firefox v.53.0 and may not work in other, especially very old or future releases.

Add-on doesn't work on Mozilla Firefox version 59.0.1.



Google Chrome


You can use the link to the video that demonstrates creating Chrome browser as application souce below:


https://www.youtube.com/watch?v=uw8nCi6q11M&t=212s 


Launching Chrome as an application source in Polywall is possible, though somewhat tricky, similar to Firefox case described above. The two main issues are:


* Google Chrome does not launch separate processes for different web pages, therefore separate user data directories have to be created manually for each running instance of Chrome.
* Although Google Chrome has an out of the box 'kiosk mode' as in Internet Explorer, it behaves in other manner and will always use all the awailable viewport space, rendering to be not quite compatible with a way Polywall controlls target application's window size. There is a workaround solution to launch Chrome in a windowed mode without window system borders using a special Chrome App provided below.


Configuring profile directories


1.1. Create a folder for custom Chrome settings e.g. C:\mychrome


1.2. Create subfolders for chrome profiles, one for every separate webpage to be displayed in a videowall, e.g.:


C:\mychrome\1

C:\mychrome\2

etc.


1.3. Download Polywall Chrome App (see the download link in the bottom of this page). Unzip it to any temporary folder.


1.4. Copy an instance of an unzipped 'app' folder to every data directory created in step 1.2 as follows:


C:\mychrome\1\app\*

C:\mychrome\2\app\*

etc.


1.5. Open and edit every file background.js from every C:\mychrome\<data-dir>\app\ directory. Locate a string containing


wv.src="http://polywall.net";


and substitite http://polywall.net with any desired URL. For example.com it should look like:


wv.src="http://example.com";


Configuring Chrome settings


After the folder setup is ready Chrome has to be launched manually to register a Polywall Chrome App within it. It has to be done with every instance of Chrome setup (i.e. once for every web page)


2.1. Launch chrome from console as follows:


"<path to chrome.exe>\chrome.exe" --user-data-dir="c:\mychrome\1"


Where "c:\mychrome\1" are profile folders created in step 1.2.


2.2. Type chrome://extensions in the address bar to launch Chrome extension manager. Switch to developer mode by selecting corresponding checkbox in the upper-right corner.


2.3. Press "Load unpacked extension" button and choose a Polywall Chrome App instance frome corresponding folder (c:\mychrome\1\app, c:\mychrome\2\app, etc. respectively)


2.4. After the app is loaded write down it's ID (looks like 'hkagpmmfgmhjnmknkoeikccfljjpbbie' though the exact letters will be different).


2.5. Repeat the above steps for every created profile.


Configuring Polywall sources


For each web page a separate "Application" source has to be created as follows:


"<path to chrome.exe>\chrome.exe" --user-data-dir="<profile directory>" --app-id=<app id>


The command-line parameters are:


--user-data-dir="<profile directory>" tells Chrome to to use a profile directory, specified in <profile directory>, created in step 1.2. (e.g. c:\mychrome\1, c:\mychrome\2, etc.)

--app-id=<app id> tells Chrome to launch a Chrome App with a unique id, created in step 2.4.


Compatibility


This solution was tested with Chrome 58.0 and may not work in other, especially very old or future releases of Chrome. Please note that as Google has announced Chrome will be removing support for Chrome Apps in 2018 and some issues with Chrome Application in this solution may occure in early 2018.


Update (19.04.2018)


We have made the script, which simplifies a process of creating Google Chrome sources. 


First of all we should unzip the files from the archive which contains the script.


Then follow the steps below. For the better understanding all steps will be described for particular default case. The conditions for this case are:


  • All Polywall components are installed on one machine with IP address 192.168.1.5.
  • Operator runs this script from his own workstation with IP address 192.168.1.6. (Actually this IP address does not participate in the script configuration, we indicated it as an example).
  • Chrome sources will be created in default repository with name "Repo". As you might remember this repo is stored by default on the machine with Polywall Server component C:\Polywall content. This repo URL in Server settings is: http://192.168.1.5/c/PolywallContent/.
  • Chrome applets location is C:\Chromeapp\.


1) Open "settings.ini" and change the path to Remote repo folder (e.g. C:\PolywallContent), Remote Chrome profile folder (\\192.168.1.5\polywall\pwchrome), Local Chrome profile folder (C:\polywall\pwchrome\) and  Path to Chrome app on Visualizer (C:\Chromeapp\). 

2) Save changes.

3) Open the script "polychromeurl_creator".

4) Type the name of the source (e.g. Google) and then type the full link to the web site (e.g. http://google.com).

5) Press any key. Command promt will close automatically.


It will create the source in Repo folder, that you will drop on the display in Polywall Designer.