# system.perspective.setTheme('dark') not working on Session Events - Startup

**URL:** <https://forum.inductiveautomation.com/t/system-perspective-settheme-dark-not-working-on-session-events-startup/58747>\
**Category:** Ignition\
**Tags:** ignition80, scripting, perspective\
**Created:** [April 22, 2022, 2:52pm UTC](https://forum.inductiveautomation.com/t/system-perspective-settheme-dark-not-working-on-session-events-startup/58747 "2022-04-22T14:52:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tmahaf](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tmahaf/32/23492_2.png) [@tmahaf](https://forum.inductiveautomation.com/u/tmahaf)\
**Post date:** [April 22, 2022, 2:52pm UTC](https://forum.inductiveautomation.com/t/system-perspective-settheme-dark-not-working-on-session-events-startup/58747/1 "2022-04-22T14:52:04Z")

</div>

Hello there,

I’m just trying to set the default theme for when a user logs into the project as ‘dark’, sometimes I find these session event scripts to not work for some reason, and this one is not working. What am I doing wrong?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/5/35ac22186f14aeb2bb0965ebd4456fb4152c1dfd.png)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [April 22, 2022, 3:08pm UTC](https://forum.inductiveautomation.com/t/system-perspective-settheme-dark-not-working-on-session-events-startup/58747/2 "2022-04-22T15:08:49Z")

</div>

Are there any errors in the logs?  
Also, you could just directly manipulate the session property for the theme to ‘dark’ to set the default.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [April 22, 2022, 3:36pm UTC](https://forum.inductiveautomation.com/t/system-perspective-settheme-dark-not-working-on-session-events-startup/58747/3 "2022-04-22T15:36:16Z")

</div>

![Session theme dark](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/0/f0f6059bf10cc20e59f3d68363d9b739074ff44c.png)

Just set the **session.props.theme** to **dark** and that becomes the default. No need for a script.

* * *

The [system.perspective.setTheme](https://docs.inductiveautomation.com/display/DOC81/system.perspective.setTheme) manual page says,

> Note that this function only changes the theme for a single page, not the entire session. **To change the theme for a session, write directly to the** `session.theme` **property instead.**

---

<div class="post-metadata">

**Author:** ![tmahaf](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tmahaf/32/23492_2.png) [@tmahaf](https://forum.inductiveautomation.com/u/tmahaf)\
**Post date:** [April 25, 2022, 5:17pm UTC](https://forum.inductiveautomation.com/t/system-perspective-settheme-dark-not-working-on-session-events-startup/58747/4 "2022-04-25T17:17:03Z")

</div>

Transistor mentioned that the scope of that script is limited to pages, which would explain why that doesn’t work for session scripts. Thanks for pointing out where to properly set it.
