--- title: "system.vision.lockScreen" description: "Used to put a running client in lock-screen mode." --- # system.vision.lockScreen > Used to put a running client in lock-screen mode. :::info Backwards Compatibility This function replaces [system.security.lockScreen](versioned_docs/version-8.1/appendix/scripting-functions/system-security/system-security-lockScreen.md). Any scripts containing Vision Client scoped functions that were replaced with system.vision syntax will still work to maintain backwards compatibility. ::: 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.vision.unlockScreen()](appendix\scripting-functions\system-vision\system-vision-unlockScreen.md) function. ## Client Permission Restrictions This scripting function has no [Client Permission](../../../ignition-modules/vision/vision-project-properties/vision-project-properties.md#vision-permissions-properties) restrictions. ## Syntax `system.vision.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 Vision Client ## Code Example ```python title="Code Snippet" # 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.vision.getInactivitySeconds() > 15 and not system.vision.isScreenLocked(): system.vision.lockScreen() elif system.vision.getInactivitySeconds() > 30: system.vision.logout() ```