Display the device name of a SiteKiosk Online client in a project

The following developer blog entry describes how to create a button that shows the user the device name of the client he or she is using in an alert dialog. It also describes how to display the device name in a text element. 

This entry works with SiteKiosk Online for Windows and Android clients.

For the alert dialog, follow these steps:

Create a project using the Empty template. 

Add a text element using the New button. 

In the URL address line, type &expert at the end of the URL.

 

Select the URL and press Enter to reload the project.

Double click to open the properties dialog of the text element.

Press the Expert Edit button at the bottom left.

Go down in the Expert section and enter triggerActions in the Add properties edit box.

Select JSON Object from the dropdown menu on the right and then add the following lines in the box to the left of it:

{

  "pressed": {

    "actions": [

      {

        "type": "executeScript",

        "script": "alert(siteKiosk.remote.blackboard.getValue('StC.MachineInfo.Name')?.value)"

      }

    ]

  }

}

Press the plus button to add the setting. Then press Save to save the settings you have set.

Publish the project to an Android or Windows client and click on the text element to test the dialog.


Use the following steps to add the machine name to a text element:

Create a text element. 

Double click to open the properties dialog of the text element.

Write {$machineName} in the text element. 

Press the Expert Edit button at the bottom left.

Go down in the Expert area and enter onActivated in the edit box Add properties.

Select JSON Object from the dropdown menu on the right and enter the following lines in the box to the left:

{

  "takeFromTriggerActions": true

}

 

Press the plus button to add the setting. 

Enter the edit box Add properties triggerActions

Select JSON Object from the dropdown menu on the right and enter the following lines in the box to the left:

{
  "pressed": {
    "actions": [
      {
        "type": "executeScript",
        "script": "const id = this.element.id;const element = siteKiosk.content.getElementByName(id);const machineName = siteKiosk?.remote?.blackboard?.getValue('StC.MachineInfo.Name')?.value || 'unknown';element.replacePropertyPlaceholders('text', { machineName });"
      }
    ]
  }
}

 

Press the plus button to add the setting. Then press Save to save the settings you have set.

Publish the project to check the display of the client name in the text element

How to configure buttons to start external applications over the start menu and taskbar

This devblog entry describes how to generate buttons for launching external applications in the SiteKiosk Online Client for Windows via the Start menu or the taskbar. This is especially useful for full-screen browser projects where you want to launch external applications that are controlled by SiteKiosk.

The following entry works with SiteKiosk Online Client for Windows version 1.1.2539.6604 or higher (https://sitekiosk.online/). Note that it can only be used for windows clients. In this example Notepad is starting over customized buttons in the start menu and taskbar.

We start with generating a project with the template browser. 

Go to Settings - Client - Advanced and press the Add settings button

Enter the Path applications and following value:

[

    {

        "name": "notepad",

        "startParameters": {

            "kind": "executable",

            "executable": {

                "filePath": "C:\\WINDOWS\\system32\\notepad.exe",

                "arguments": null,

                "startAsChildProcess": false

            }

        }

    }

]

 

Save the setting.

To generate a taskbar button, press the Add settings button.

Enter the path ui.taskbar.taskbarEntries and add following value:

[

    {

        "name": "logoutSiteKiosk"

    },

    {

        "name": "startApplication",

        "startApplication": {

            "name": "notepad"

        }

    }

]

 

Save the setting.

To activate the start menu, press the Add settings button.

Enter the path ui.taskbar.showStartMenu and check the checkbox.

 

To generate a start menu entry, press the Add settings button.

Enter the path ui.taskbar.startMenuEntries and following value:

[

    {

        "name": "logoutSiteKiosk"

    },

    {

        "name": "startApplication",

        "startApplication": {

            "name": "notepad"

        }

    }

]

 

Save the setting and close the Clients setting dialog with pressing the button save.

Publish your project to test the settings.

Transfer a URL from a Kiosk to Another Device with a QR Code

This entry describes how you can generate a QR code from the web page displayed in the browser using a script. The QR code can e.g. be used to transfer the URL of the displayed web page to a smartphone. We start with the template empty and generate a browser with a webpage element. Double click on the webpage element and add the start URL https://www.sitekiosk.com/ .Then you create an image element next to the web page element. The image element must not overlap with the web page element, otherwise it will not be displayed. 

Now the image element must be adapted for the QR code display. To do this, you must start the expert mode by entering &expert in the URL address line and then pressing Enter to reload the project. 

Double-click on the image to open the image's properties dialog and press the Expert Edit button at the bottom left.

Go down in the properties dialog and add under Add property the setting qrCodeData with the value https://www.sitekiosk.com/ and the type auto. Then press the Plus button to add the setting.

Then go to the expert setting src and add the setting ,"fileName":"" after the entry "fillColor": "rgb(0,0,0)" value that it looks in the end like this:

{
  "fillColor": "rgb(0,0,0)",
  "fileName": ""
}

Save the settings. Select the image and assign the tag name qrCodeImage in the menu bar. 

Select the web page element and assign the tag name browser in the menu bar. 

Go to Settings - Content - Scripts and press the Add button. Give the script the name QRCodeUrlScript and add the following script lines:

siteKiosk.content.onContentInserted(() => {
	const qrCodeImage = siteKiosk.content.getElementByTag("qrCodeImage");
	const browserElement = siteKiosk.content.getElementByTag("browser").getDomElement();
	browserElement.addEventListener("page-finished-loading", url => {
		qrCodeImage.setPropertyValue("qrCodeData", url.detail);
	});
});

Save and publish the project. Now after changing the url in the webpage element, the displayed QR code will be automatically adjusted.

User Logoff on Screensaver Activation or SiteKiosk Logout Button Usage for SiteKiosk Online

This script example is suited for environments where SiteKiosk Online is started when users login to the kiosk terminal with their individual accounts instead of the default SiteKiosk user and the terminal should return to the Windows login screen once the user leaves the terminal. In most cases this means domain environments.

Instead of using the standard Auto Start mode from the SiteKiosk Quick Start menu click on "Settings" at Auto Start. Choose “Auto start with shell replacement for all users” and disable “Log on automatically at system startup”.

Then click “Save” and use the “Start” button at Auto Start. This leaves the kiosk terminal at the Windows login screen when turned on, where users can type in their credentials and SiteKiosk Online will start right after the login of the user.

 

In order for the kiosk terminal to return to the Windows login screen either when a user presses the default SiteKiosk logout button or the screensaver activates a custom setting can be added in the Advanced Client settings of SiteKiosk online:

Open your Project (e.g. Browser) on https://sitekiosk.online and go to ">Settings>Client>Advanced"

 

Then press the green "Add setting" button and enter the following in the "Path" input field.

 

system.startupScript

 

And at value insert this script code: 

siteKiosk.onLogoutCompleted(()=>{

 

      __siteKiosk.logoffUser();

 

}); 

 

Press the “Save"button and publish the project.

To test the setting wait for screensaver activation or press the logout out button.

Enabling Single Sign On with Azure Active Directory in SiteKiosk Online Windows

By default single sign on with Azure Active Directory is disabled for security reasons in SiteKiosk Online Windows. If you need this form of modern authentication in your kiosk project you can enable it in your SiteKiosk Online team.

Just login to your team, click on Projects in the menu on the left side. Create a project or select an existing one. At the top click on Settings and choose Client from the dropdown. Click on Advanced and press the Add setting button. In the Path field type:

system.browser.browserSso.enabled

Now tick the box under Value.

Single sign on with Azure Active Directory is now available in Webpage elements for this project on SiteKiosk Online Windows clients.

Please note that classic single sign on based on standard Active Directory is a built-in feature of the Electron framework that SiteKiosk Online uses.

Launching UWP Apps in SiteKiosk Online

The following works for the SiteKiosk Online Version 1 or higher. Note that it can only be used for Windows clients.

This example uses the Empty template o SiteKiosk Online with an image element added to start the UWP app from.

To find the required information needed to run the UWP app enter “run” in the Microsoft search field and select the run app.

 

Type shell:AppsFolder in the Open field and hit the OK button.

Look for your desired app and right click on it. 

 

Select “Create shortcut” and place it on the desktop when prompted.

To obtain the package name do a right click on the desktop shortcut.

Select “Properties” and open the shortcut tab. 

  

In both fields, Target type or Target, you will find the Package or Program Family Name. The Package or Program name will be the text before the underscore separator.

In this case, we want to use the Grooce Music app. We will need to use this part of the Target type: “Microsoft.ZuneMusic”.

In SiteKiosk Online open the properties dialog of the image element and go to the “Actions” section. 

  

Activate Start app/programm and enter the package name with the prefix uwp: uwp:Microsoft.ZuneMusic

Save the setting and publish the project to a Windows client to test the starting of the UWP app.

Use the Cookie Extractor to allow cookie setting in advance

The following entry works for the SiteKiosk Online Version 1.0.2098.4728 or higher (https://sitekiosk.online/). Note that it can only be used for windows clients.

In the case you want to predefine cookies of a webpage displayed in SiteKiosk you can use our Cookie Extractor to insert the permit into the project. 

The following example uses the Browser template which contains a webpage element.

The Cookie Extractor can be downloaded here.

Start the Cookie Extra after installation. Enter the URL of the webpage, in which you want to allow the cookies in advance.

Press the button "Start Cookie Gathering" to load the cookies.

Press the "Accept" button in the webpage to allow the chosen cookies.

Close the window.

Press the "Test Cookies" button to test selected Cookies.

Close the window and press the "Copy to Clipboard" button. 

Open your SiteKiosk Online project and go to Settings - Client - Advanced. Then press the "Add setting" button.

 

Enter the system.browser.predefinedCookies under Path and the clipboard of the Cookie Extractor under Value. 

Save the Advanced Setting.

Open the Settings of the webpage element by double click on the element. 

Enter the URL of the webpage in which you want to allow the cookies in advance and save the setting.

Publish the project to a Windows client to test the setting.

Applying the System Security Manager Settings to other Users

The SiteKiosk System Security Manager helps you to manage the restricted SiteKiosk user. The user is created by the SiteKiosk installer. It is a local standard Windows user account. The System Security Manager further restricts this account to increase the security of the kiosk terminal. The manager enables you to customize the restrictions for the SiteKiosk user to your needs. We strongly recommend to run SiteKiosk with this user, which is the default behaviour when using the Auto Start mode of SiteKiosk.

In case your kiosk environment requires the usage of another user you can do so by using the Customized start options of SiteKiosk. For those scenarios we recommend to use the default Windows options, e.g. local or domain policies, to secure this user to meet your project requirements.

If you want to apply the same restrictions to your user which the System Security Manager applies to the local SiteKiosk Windows user, you can use command line parameters for this. Please note that these parameters are unsupported and provided as is. Use the following information at your own risk. Also note that if you apply the restrictions to a domain user they might only last until the next periodic domain policy update on the computer, because domain policies always overrule local settings if they overlap.

The SystemSecurity.exe is located in the main installation folder of SiteKiosk Windows, e.g. C:\Program Files (x86)\SiteKiosk.

To open the graphical user interface of the SiteKiosk System Security Manager with a user of your choice, use the follwing command line parameters:

SystemSecurity.exe /user:<UserNameOrSID> /pass:<Password> /domain:<DomainName>

To apply the default settings used for the restricted SiteKiosk user to a user of your choice without using the graphical user interface, you can use the following command line parameters:

SystemSecurity.exe /applydefault /user:<UserNameOrSID> /pass:<Password> /domain:<DomainName>

Use SiteKiosk Online to Transfer a HTML File which is displayed in the Content

In case you want to display a HTML file in a webpage element, which is transferred directly by the project, you can use the following entry. The entry works for the SiteKiosk Online Version 1 or higher. 

Generate a project with template Empty.

Import a html file with the name example.html into the media library of the SiteKiosk editor.

Insert a webpage element. 

Open the properties dialog of the webpage element and enter the internet address content://example.html

Publish the project to a client to check the display of the HTML file.

Preload Webviews with the Expert Settings of SiteKiosk Online

The following works for SiteKiosk Online Version 1 or higher.

In case you want to preload webviews in sequences or on certain pages you want to navigate to, you can use two expert settings, which have to be combined. The following example uses a project which consists of a sequence container with an included webpage element.

Open the project and activate the expert mode. For this you have to add &expert at the end of the URL in the URL address field of your browser and then press Enter to reload the project.

 

After activation of the expert mode, select the webpage element and press the expert edit button in the menu bar.

 

Scroll in the expert properties on the right to the entry shouldUnloadWhenHidden and deactivate the checkbox.

Scroll to the bottom of the expert settings and in the Add property edit box enter the entry shouldReloadWhenHidden. Choose Boolean in the dropdown menu and activate the checkbox. Then press the plus button.

Scroll again to the bottom of the expert settings and in the Add property edit box enter the entry loadOnCreation. Choose Boolean in the dropdown menu and activate the checkbox. Then press the plus button.

Please save the expert properties by pressing the Save button.

Make a copy of the webpage element and insert it into the sequence.

Set a start URL for each webpage element in the element properties and set the display duration of each webpage element to e.g. 60 seconds. 

Publish the project to a client to check the preload function.