--- title: "system.vision.closeDesktop" description: "Allows you to close any of the open desktops associated with the current client." --- # system.vision.closeDesktop > Allows you to close any of the open desktops associated with the current client. :::info Backwards Compatibility This function replaces [system.gui.closeDesktop](versioned_docs/version-8.1/appendix/scripting-functions/system-gui/system-gui-closeDesktop.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 Allows you to close any of the open desktops associated with the current client. See the [Multi-Monitor Clients](ignition-modules\vision\common-tasks-in-vision\multi-monitor-clients\multi-monitor-clients.md) page for more details about using multiple monitors. :::note If you have already created a reference to your desktop in a script, you can use the VisionUtilities wrapper class instance method close() instead. Note that you may have to repeat the desktop handle when using this method. ::: ## 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.closeDesktop(handle)` ### Parameters Type | Parameter | Description ------- | ------- | ------ String| `handle` | The handle for the desktop to close. The screen index cast as a string may be used instead of the handle. If omitted, this will default to the primary desktop. Alternatively, the handle "primary" can be used to refer to the primary desktop. ### Returns Nothing ### Scope Vision Client ## Code Examples ```python title="Example #1" # The following example will close this desktop system.vision.closeDesktop() ``` ```python title="Example #2" # The following example will close desktop 2 # The handle must be a string system.vision.closeDesktop("2") ``` ```python title="Example #3" # The following example will close the desktop named "Left Monitor" system.vision.closeDesktop("Left Monitor") ```