Dave
Dave

Reputation: 987

What are the technical advantages to running your app in Chrome Kiosk mode?

I am interested in knowing if there are any technical advantages/disadvantages to running a web app/site in kiosk mode.

I have heard from someone that running your site in kiosk mode gives additional permissions to your site to access files, write files,print etc. which could be useful for my site but I can't find anything online about technical differences between the two. I only managed to find info regarding session management and ways to "hack" kiosk mode.

Specifically I'd like to know about print functionality. I'd like to print a slip to a dot matrix printer without having to use a windows service. Important things to note are that this content should only be printed once, the built in PDF/web page functionality doesn't suffice as that allows multiple prints. So I would like to either track/limit the amount of prints printed.

Does anyone know of a list of the technical differences between normal- and kiosk mode for Chrome other than the fact that it show a page full screen and lock a user out of the device to a certain extent?

Upvotes: 1

Views: 1664

Answers (2)

Mitja Gustin
Mitja Gustin

Reputation: 1781

i'm soory to drive you away from Chrome, but it's not off topic... The real benefit can be running Firefox in kiosk mode (example: running barebone linux with simple window manager; the Windows is option also, with little more work). With Firefox you can use XUL programming language, where HTML browser is just a component you combine with other components. So you can for example develop a custom keyboard (with buttons, links, emojis, etc), which the comunicates with firefox browser component, set's its url and so one. With Chrome you cannot achieve this in simple way, because it only support Extensions, where the main development is just inside browser (webpage). With XUl, you can really make your own "kiosk", with browser being one of the things to offer. So then you can for example:

  • check URLs user types,
  • provide your own behaviour for bookmarking,
  • overridde "back" functionality and so on.
  • override print functionality, provide your own print page etc ...

This has special uses where one can benefit the user, or strictly limit what end user can do with browser. Example of XUL code:

<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://gustinmi-kiosk/content/overlay.css" type="text/css"?>
<?xul-overlay href="chrome://gustinmi-kiosk/content/overlay.xul"?>
<window
    id="main"
    title="gustinmi-kiosk"
    sizemode="maximized"
    height="1024"
    width="1280" 
    scrolling="no" 
    xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
    xmlns:html="http://www.w3.org/1999/xhtml"
    class="blackbox"
>
    <script type="application/x-javascript" src="chrome://gustinmi-kiosk/content/touchscreen.js"/>

    <vbox id="navigator">
        <hbox class="address">
            <textbox id="omnibox" class="omnibox" type="autocomplete" value="" />
        </hbox>
        <hbox class="bookmarks">
            <button label="Google" class="kioskKey" oncommand="kiosk.navigate('http://www.google.si/')"/>     
            <button label="Gmail" class="kioskKey" oncommand="kiosk.navigate('http://www.gmail.com/')"/>
            <button label="GoogleMaps" class="kioskKey"  oncommand="kiosk.navigate('https://maps.google.com/')"/>
            <button label="Github" class="kioskKey"  oncommand="kiosk.navigate('https://github.com/gustinmi')"/>
        </hbox>
    </vbox>

    <vbox id="content" flex="1">
            <!-- the instance of browser will be added here -->
    </vbox>

</window>

Upvotes: 1

user5364144
user5364144

Reputation:

From what I found, you can not access file system in kiosk mode and there is not any special differences:

Kiosk mode does not have an accessible file system of any kind. All elements accessed by Kiosk mode must be hosted by a remote web server.

The exception to this rule is in managed devices, or the Google Apps for Work world. Signage licenses will allow more advanced options, like caching files locally. You might want to look into those options, as they're quite reasonably priced.

https://www.google.com/work/chrome/digital-signage/

But I also found, that you can automatically print using --kiosk-printing startup command.

Enable automatically pressing the print button in print preview.

Found on chromium site referencing to this list.

How to set it up? (Windows)

  1. Check if you have setup your printer as default
  2. Navigate to Chrome installation folder and create .bat script: chrome.exe --kiosk-printing --kiosk https://example.com
  3. Try to print something, it should show print preview, but print it automatically

Sources:

Upvotes: 3

Related Questions