--- title: "system.security.lockScreen" description: "Used to put a running client in lock-screen mode." --- # system.security.lockScreen > Used to put a running client in lock-screen mode. This function is used in **Python Scripting**. ## Description Used to put a running client in lock-screen mode. The screen can be unlocked by the user with the proper credentials, or by scripting via the [system.security.unlockScreen()](appendix\scripting-functions\system-security\system-security-unlockScreen.md) function. ## Client Permission Restrictions This scripting function has no [Client Permission](projects\project-properties\project-properties.md#client---permissions) restrictions. ## Syntax `system.security.lockScreen([obscure])` ### Parameters |Type|Parameter|Description| |--|--|--| |boolean| `obscure`| If true(1), the locked screen will be opaque, otherwise it will be partially visible. [optional]| ### Returns Nothing ### Scope Client ## Code Examples ```python title="Example #1" # This would run in a timer script to lock the screen after 15 seconds of inactivity, and then log the user out after 30 seconds of inactivity. if system.util.getInactivitySeconds() > 15 and not system.security.isScreenLocked(): system.security.lockScreen() elif system.util.getInactivitySeconds() > 30: system.security.logout() ```