PROVISIO DevBlog

Adding More Than Two Custom Buttons to the Chrome Skin of SiteKiosk Windows

Using the SiteKiosk configuration, you can add two custom buttons to the toolbar of the Chrome Browser in SiteKiosk Windows. In case your kiosk project requires more than two, you can add additional buttons by manually editing your SiteKiosk configuration file.

Start by creating a configuration with the default option of two custom toolbar buttons. Go to Start Page & Browser -> Chrome Browser -> Customize -> Browser Toolbar. Scroll down to the Individual Buttons section and edit the two buttons to your liking. When you are done, save the configuration.

The next step is to open your configuration with an editor like Notepad or Notepad++. SiteKiosk configuration files can usually be found in the ..\SiteKiosk\Config folder.

In the editor, search for customButtons. Your search will lead to some lines, that look similar to this:

"customButtons": {
	"button1": {
	  "caption": "Button 1: Open www.provisio.com",
	  "action": "openLink",
	  "url": "http://www.provisio.com/"
	},
	"button2": {
	  "caption": "Button 2: Toggle Onscreen Keyboard",
	  "action": "toggleOnscreenKeyboard",
	  "url": "file://"
	}
}

The customButtons section includes two entries for the individual buttons that have been created in the configuration, button1 and button2. The caption value contains the caption of a button, the action value contains one of the seven available actions for a button and the url value contains an optional URL if the openLink action has been selected, otherwise the default value is file://.

Available actions are as follows, the names speak for themselves:

"action": "shutdownWindows",
"action": "restartWindows",
"action": "logoffWindowsUser",
"action": "restartSiteKiosk",
"action": "showPasswordDialog",
"action": "toggleOnscreenKeyboard",
"action": "openLink",

Note that using toggleOnscreenKeyboard requires that you have configured one of the available On-Screen Keyboards in the SiteKiosk configuration, showPasswordDialog requires that you did not choose the option to not use a password to close SiteKiosk.

Adding an additional individual button is pretty straight forward. Create a new button entry named button3 (button4, button5, etc.) and set the caption, action and url (if the action is openLink) values. Basically you should get something like this:

"button3": {
  "caption": "Button 3: Logoff Windows User",
  "action": "logoffWindowsUser",
  "url": "file://"
}

If a button entry is not the last one, you need to add a comma after the closing curly bracket, e.g.:

"button3": {
  "caption": "Button 3: Logoff Windows User",
  "action": "logoffWindowsUser",
  "url": "file://"
},

Here is an example of a  modified version of the customButtons section with four individual buttons:

"customButtons": {
	"button1": {
	  "caption": "Button 1: Open www.provisio.com",
	  "action": "openLink",
	  "url": "http://www.provisio.com/"
	},
	"button2": {
	  "caption": "Button 2: Toggle Onscreen Keyboard",
	  "action": "toggleOnscreenKeyboard",
	  "url": "file://"
	},
	"button3": {
	  "caption": "Button 3: Logoff Windows User",
	  "action": "logoffWindowsUser",
	  "url": "file://"
	},
	"button4": {
	  "caption": "Button 4: Restart Windows",
	  "action": "restartWindows",
	  "url": "file://"
	}
}

If you save the above example as part of a SiteKiosk configuration and start SiteKiosk with it, you will get this result:

For the purpose of this screenshot, most of the default toolbar buttons have been disabled in the SiteKiosk configuration.

Please also keep in mind, that every additional custom button, beyond the two default individual buttons, will not be visible in the configuration editor of SiteKiosk. Changes need to be done in a text editor.