Integrating Kiosk Mode into your Solution

By Daniel Wood, 5 October 2011

Kiosk mode is a cool way to run a FileMaker database in a full screen environment where users are prevented from accessing the other functionality of the operating system. But what if you have a normal FileMaker solution and wish to use kiosk functionality in certain areas only?

In this article we illustrate how a typical FileMaker solution can be enhanced with a kiosk component for carrying out certain actions. We use the article example file to help illustrate this. We also give some information on what kiosk mode is, and things to watch out for when developing for it.

So what is Kiosk Mode?

The majority of FileMaker solutions run in what could be called a normal windowed environment. Upon opening a database, it appears in its own window on a mac - or within the FileMaker application on windows. Users are free to use the rest of their operating system whenever they wish.

Kiosk mode is a little different in that it prevents users from interacting with the operating system, and keeps FileMaker open as the central and only application they can interact with. The term "Kiosk" is used because the functionality resembles that seen on kiosk machines in places such as restaurants, museums and so on.

How do you create a Kiosk file?

A FileMaker file by default has Kiosk mode disabled. Enabling is done by using the Developer Utilities dialog that is build into FileMaker Pro Advanced.

kioskmode 1

Select the file(s) you wish to enable Kiosk mode in by using the Add button, select the output folder also. You then want to click on "Specify" under Solution Options.

kioskmode 2

In here you want to tick the Kiosk mode option. Upon hitting the "Create" button on the main dialog, a kiosk mode version of the file will be generated.

Developing or Using a Kiosk File

Now that the file has had kiosk mode enabled, it is important to know how to access your file for either the purpose of using, or developing.

FileMaker help has this to say:

Kiosk mode is ignored if the solution is opened by accounts with the Full Access privilege set, a privilege set that allows management of extended privileges, or a privilege set that allows modification of layouts, value lists, and scripts.

This factor is key. If you want to develop your file, always remember to log in as a [FULL ACCESS] user. If not, you will inadvertently end up with the file open in Kiosk mode if your login account meets any of the criteria above.

If your file does open in Kiosk mode, then you have to provide a means for yourself, or your users to close the file. There is no native close option, so without a button or some other means to close the file, you will be stuck in the file and have to resort to other means to get out of the file - such as force closing the file on Server, terminating the FileMaker Pro application via remote login, or restarting your machine. Neither option is really nice so be sure to provide a way to close the file!

Now with that all out of the way, time to get into the guts of this article:

The whole point of this article is integrating kiosk functionality into a regular non-kiosk database. We know that a kiosk-enabled file will open in kiosk mode under certain conditions, so having a single file is not going to cut it because we cannot guarantee all users will have the required account level to open in kiosk mode always.

The solution is to build a secondary kiosk file that links to your main database. The kiosk file is called into action whenever that functionality is required. The overall process is not too difficult, but there are a number of things to take into consideration.

A basic example: Kiosk file for taking tests

One great use of the kiosk functionality is for users of the database who are required to take tests. If someone is taking a test then you would not wish for them to have access to things such as their web browser! Kiosk mode would be great for this given it restricts the users access to these things. For anyone who has ever taken the FileMaker certification exam, we are aiming for a similar feel here.

We will use the attached example file as the basis for the example in this article, so it might be a good idea to download it if you haven't already.

Step One: Link your main file to your kiosk file

This part is achieved by setting up external data sources in both your main file and kiosk file. Each file should have a reference to the other file. One way to think of the kiosk file is merely an extension of the main file. It doesn't need to contain its own tables or data, it is purely for kiosk functionality for the main database.

kioskmode 3

Step Two: Setup a Full Access, and non Full Access user

This is done in the kiosk file. This file requires a [FULL ACCESS] account so you can modify the file if need be. However to make use of kiosk mode, it will require an account that is not full access.

kioskmode 4

Here we have a full access account, and another setup as data entry only. The "Test User" account is the one that will be used by everyone who accesses the file for taking tests.

kioskmode 5

Here, we have set the Kiosk file to automatically login as this Test User.

A very important thing to take note of here is how FileMaker will attempt to log a user into a file that opens from another file. Lets say a user is opening File B from File A. Upon launching File B, FileMaker is going to try and find a matching user account in that file, and if one is found, log the user into File B with that account. In this situation we don't wish for this to happen. The reason is that if a user is logged into File A with [FULL ACCESS], and there is a matching account in the Kiosk file, then they would log into kiosk with [FULL ACCESS] and as such, the kiosk functionality would not work - they would log into it as if it were a regular file.

For this reason, it may be good convention to make the [FULL ACCESS] username and password in the kiosk file something entirely different from any [FULL ACCESS] account in your main file, that way this scenario will not occur, and everyone will open the kiosk file with the Test User account.

Step Three: Enable Kiosk mode

At this point it would be a good idea to enable Kiosk mode on your kiosk file if not already. Refer to the start of the article on how this is done, and some of the things you need to be careful of once the file becomes kiosk enabled.

Lets take a breather, where are we up to..

At this point we have the following:

  • A main database file
  • A kiosk enabled file with [FULL ACCESS] and non [FULL ACCESS] users.
  • Kiosk file is set to login with non [FULL ACCESS]
  • Both files are linked to each other via external data source.

The next steps will involve initialising the kiosk file from the main file, some issues that can arise from this process, and how we can resolve them.

Setting the scene for what we want to achieve

In the main file we have a portal of 10 test records as shown below:

kioskmode 6

When a user clicks on a test record, we want that test to open in kiosk mode. The user would then fill out the test, and when they are done, they would close the test and be back where they started. Sounds simple right?

Step Four: Initiating the Kiosk File

The kiosk file is closed at all times, other than when it is being used. We don't wish for it to appear in the FileMaker Windows menu, so we open and close it explicitly when we begin using it, and when we are done.

kioskmode 7

The above script is run when the user clicks on a test in the portal. At this stage we are still in the main file. The script is passed the ID of a test record, which will eventually be passed to the kiosk file.

The last script step here calls a script over in the kiosk file and passes it a test ID. This is how the kiosk file is initiated.

Step Five: Correct setup of Kiosk File


A script has now been called in the kiosk file which is going to open the file and initiate it. There are some very important housekeeping things that this script must do first in order to ensure that kiosk mode is watertight and prevents the user from getting out of it.

When a kiosk mode file is opened, and there happens to be other databases and windows also open, then these other database windows are also visible whilst in kiosk mode. In fact, if you click on one of the other databases it will switch to it and take you out of kiosk mode temporarily.

From a testing perspective this is bad news, if a user can get to another database open, then they can reveal their dock and get into their browser and so on.

The solution here is to ensure that when you open up the kiosk file, that its window dimensions are set exactly to that of the screens dimensions, so that the layout takes up the entire screen real estate, thus hiding any other open window underneath.

(Note that prior to this, we had used scripts to hide and restore all other windows upon opening and closing the kiosk file, these work fine, but simply making the layout size full screen is much easier and less scripting!).

kioskmode 8

Here is the start of the initiation script in the kiosk file. The freeze window helps the startup go smoother visually.

You'll notice we do a very brief pause of 0.1 seconds. The reason for this is that when the kiosk file opens, it very briefly opens in a normal windowed mode, before entering kiosk mode. Without the pause, our next script step that sets the window position and size actually happens while it is still in a windowed mode, and this makes it near on impossible to correctly set the window to full screen size (due to issues arising with docks and such).

The pause gives us just enough time to enter kiosk mode, so that when we set the window dimensions to Get(ScreenWidth) and Get(ScreenHeight) We are getting the full dimensions of the screen.

Step Six: Closing Kiosk File

When you are finished with the file and wish to return to the main database, you need to close the file by issuing a Close File script step command. Because kiosk mode has no exit or close command, you need to provide a means of closing the file by way of button.

kioskmode 9

In this case our big finish test button simply closes the file.

Some things to watch out for

While kiosk mode is a great way to present a full screen layout to a user (for purposes such as taking a test) - it is not 100% secure in keeping the user locked out of their operating system. While developing this technique for a client solution I realised there are some applications out there that are able to dump you out of kiosk mode temporarily. The one application I noticed that did this was Tweetdeck. Whenever this application sent a notification of updates, the resulting popup caused kiosk mode to exit.

kioskmode 10

As you can see above, we have kiosk mode running the file, yet the dock became visible.

So you need to be careful if using this for things such as testing, the computer should be setup with no other applications running that might interfere.

Example File

Please find attached an example file. This file was used for all the screenshots in this article, and is provided to help you fully understand what is going on in this article, and to let you experiment in FileMaker with this solution.

Download Example File

NOTE: Test_Kiosk.fp7 file has been set to login automatically as a non-admin user for the purpose of demonstrating kiosk mode. If you wish to access the file to have a look inside, hold down the option (shift in windows) key while opening the file:

Username: Administrator
Password: (no password)

Something to say? Post a comment...

Comments

  • Kiosk Browser 23/02/2017 7:10pm (8 years ago)

    Hi admin,

    This is a quick and an effective innovation to turn a device into a tiny kiosk. Please keep sharing your ideas, this article has helped me alot.

    Thanks.

  • ankit 11/01/2017 10:59pm (8 years ago)

    I only knew about Kiosk mode solution which I have seen on some places where only particular task running on. But this is the new concept i learned from this posting to create a kiosk file. Infact, according to my knowledge I bought Kiosk mode device lockdown solution from one company to manage mobile devices remotely. For your help if you need to know this solution then You can check this article which will help you regarding Kiosk mode solution.
    https://ems.devicemax.com/different-ways-deploy-kiosk-app-android-device-lockdown-solution/

    Thanks for sharing and helping me.

  • Steve Wright 07/07/2012 5:31am (12 years ago)

    MICHIEL, I realise this is a fairly old post but who knows, you may stumble across it at some point :) and it may help others in the future.

    On Windows, the grey borders appear in kiosk mode when the underlying window is not maximised, its a difficult one to explain since there are no 'application borders' etc, but try this out instead..

    Rather than:
    Move/Resize Window[Current Window; Height: Get(ScreenHeight) ; Width: Get(ScreenWidth) ; Top: 0; Left:0]

    Try this:

    1. Set Variable[$original_window; Value:Get(WindowName)]
    2. New Window [Name: "Something Relevant"; Height: Get(ScreenHeight) ; Width: Get(ScreenWidth) ; Top: 0; Left:0]
    3. Close Window [Name: $original_window]
    4. Adjust Window [Maximize]

    It may seem like a lot of faffing around, but it does have the desired effect, no ugly border around the kiosk solution.

  • Me again 21/02/2012 8:10pm (13 years ago)

    Just for the ones who want to know... If you want to have a background image in kiosk mode (in case you have a nice photoshop interface design), use the following settings to avoid the scrollbars to join the party:

    BODY height: screen height minus 16 pixels
    Image X: 16 pixels
    Image Y: 16 pixels
    Image width: screen width minus 32 pixels
    Image height: screen width minus 32 pixels

    So you guessed it, you are stuck with a border of 16 pixels all around. Making it black I guess will makes it look best. Oh, Mac only... still need to figure out above data for Windows.

  • Michiel 07/02/2012 6:43am (13 years ago)

    Why does the kiosk mode in Windows gives this annoying beveled edge/border? On Mac it's real full-screen. Can anybody tell me how to remove this effect? Now my kiosk mode looks like Windows 3.1, very ugly.

  • BrianR 13/10/2011 3:22am (13 years ago)

    Very interesting post, especially introducing that short pause to allow correct centering of the kiosk window on the screen; I'd given up on kiosk mode as I couldn't get it display correctly. However it does seem that the window available in Kiosk mode is limited in size - as you increase the screen resolution, the black border around the kiosk display gets bigger. You can end up with objects being clipped or disappearing completely - or is there a way to increase the size of the kiosk window too?

    Brian

  • DigitEL 12/10/2011 8:43pm (13 years ago)

    Ha Ha Ha... all these years I thought KioskMode required the runtime engine :-p so it could not be used in networked deployments, my bad I guess.
    Haven't been able to find a market for stand-alone kiosking... some interest but no biters.
    On the Mac I have developed some data/media presentations in FM that I have always wanted to present full screen, not faux full screen, ie MenuBar is still present and using second monitors have become more and more difficult as FM Inc has changed the windowing api and GUI toolbar layout. This kind of capability has been part of Windows 95+
    Still,... intriguing, but I notice kiosk files initiate across all monitors but only present on the main monitor.
    Thanks for a little paradigm shift!!!
    EL

  • Brent Hedden 11/10/2011 3:14am (13 years ago)

    Now this is a really cool idea. I've always been hesitant to use the Kiosk mode because I just presumed that the data had to be separated from the 'production' system. Which caused headaches transferring the info back and forth....

    I can definitely use this technique in many applications. Thanks!

RSS feed for comments on this page | RSS feed for all comments

Categories(show all)

Subscribe

Tags