# Determine If in Kiosk Mode

**URL:** <https://forum.inductiveautomation.com/t/determine-if-in-kiosk-mode/98286>\
**Category:** Ignition\
**Tags:** ignition81, perspective, scripting\
**Created:** [November 6, 2024, 4:08pm UTC](https://forum.inductiveautomation.com/t/determine-if-in-kiosk-mode/98286 "2024-11-06T16:08:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ryan\_Marsh](https://avatars.discourse-cdn.com/v4/letter/r/ad7895/32.png) [@Ryan\_Marsh](https://forum.inductiveautomation.com/u/Ryan_Marsh)\
**Post date:** [November 6, 2024, 4:08pm UTC](https://forum.inductiveautomation.com/t/determine-if-in-kiosk-mode/98286/1 "2024-11-06T16:08:29Z")

</div>

Typically the HMI my company designs are to stay in kiosk mode, but I for instances where the rest of the computer needs to be accessed (particularly during commissioning), so I have a button to toggle between kiosk and windowed mode, and it's symbol changes from enter/exit full screen depending on the mode it is in.

Currently use the height of the window to see if it's client or full screen, but that only works if the project is opened on a specific screen size that we can't always chose that. Is there a property that I can use to check if the client is in windowed mode or kiosk mode? Or a less hardware-specific way?

---

<div class="post-metadata">

**Author:** ![diamond](https://avatars.discourse-cdn.com/v4/letter/d/e79b87/32.png) [@diamond](https://forum.inductiveautomation.com/u/diamond)\
**Post date:** [November 6, 2024, 7:04pm UTC](https://forum.inductiveautomation.com/t/determine-if-in-kiosk-mode/98286/2 "2024-11-06T19:04:27Z")

</div>

Hello,

Install Perspective Workstation in your HMIs. Then, trigger the kiosk mode through  
[system.perspective.workstation.toKiosk](https://www.docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-perspective/system-perspective-workstation/system-perspective-workstation-toKiosk). For your purposes, just store the kiosk mode status in a session property. Write **True** when triggering toKiosk, **False** when triggering [system.perspective.workstation.toWindowed.](https://www.docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-perspective/system-perspective-workstation/system-perspective-workstation-toWindowed).

Regards

---

<div class="post-metadata">

**Author:** ![Ryan\_Marsh](https://avatars.discourse-cdn.com/v4/letter/r/ad7895/32.png) [@Ryan\_Marsh](https://forum.inductiveautomation.com/u/Ryan_Marsh)\
**Post date:** [November 6, 2024, 7:11pm UTC](https://forum.inductiveautomation.com/t/determine-if-in-kiosk-mode/98286/3 "2024-11-06T19:11:04Z")

</div>

Workstation is installed on all the official HMIs, and they're set to open in kiosk mode. For those devices it's easy to track the mode it's in since it always starts in kiosk mode.

The issue arises when someone wants to open the program outside of the official HMI (an exec wanting to remote connect and pull up a stats page on a laptop for example). They might not want it originally opening in kiosk mode, the button will have the wrong graphic on it on startup, and if the pixel density of his laptop doesn't match the HMI, my height method doesn't work either.

I realize this is a very minor issue, but it does bug me a little when I run the program and the full screen button is wrong because my resolution isn't the same as the HMI screens.

---

<div class="post-metadata">

**Author:** ![diamond](https://avatars.discourse-cdn.com/v4/letter/d/e79b87/32.png) [@diamond](https://forum.inductiveautomation.com/u/diamond)\
**Post date:** [November 6, 2024, 7:15pm UTC](https://forum.inductiveautomation.com/t/determine-if-in-kiosk-mode/98286/4 "2024-11-06T19:15:14Z")

</div>

How about forcing those people to start in kiosk mode? Just by putting that _toKiosk_ script on an _onStartup_ event. In this way, you may not loose track of the window status.

---

<div class="post-metadata">

**Author:** ![Ryan\_Marsh](https://avatars.discourse-cdn.com/v4/letter/r/ad7895/32.png) [@Ryan\_Marsh](https://forum.inductiveautomation.com/u/Ryan_Marsh)\
**Post date:** [November 6, 2024, 7:24pm UTC](https://forum.inductiveautomation.com/t/determine-if-in-kiosk-mode/98286/5 "2024-11-06T19:24:24Z")

</div>

Well, I wanted to avoid forcing the user to use a mode they didn't want to, but it seems like it's either that or have a button that sometimes has an incorrect graphic on it.

I think I'll make a feature request to add that functionality in future versions. It is odd that perspective is able to keep track of the mode in order to toggle kiosk/windows, but doesn't provide it anywhere we can access.

---

<div class="post-metadata">

**Author:** ![diamond](https://avatars.discourse-cdn.com/v4/letter/d/e79b87/32.png) [@diamond](https://forum.inductiveautomation.com/u/diamond)\
**Post date:** [November 6, 2024, 7:34pm UTC](https://forum.inductiveautomation.com/t/determine-if-in-kiosk-mode/98286/6 "2024-11-06T19:34:09Z")

</div>

As a workaround, if you have all your HMIs or users in an specific VLAN you could evaluate the IP addresses for deciding whether to start in kiosk or not.
