--- title: "system.gui.closeDesktop" description: "Allows you to close any of the open desktops associated with the current client." --- # system.gui.closeDesktop > Allows you to close any of the open desktops associated with the current client. 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](clients\multi-monitor-clients.md) page for more details about using multiple monitors. ## Client Permission Restrictions This scripting function has no [Client Permission](projects\project-properties\project-properties.md#client---permissions) restrictions. ## Syntax `system.gui.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 All ## Code Examples ```python title="Example #1" # The following example will close this desktop system.gui.closeDesktop() ``` ```python title="Example #2" # The following example will close desktop 2 # The handle must be a string system.gui.closeDesktop("2") ``` ```python title="Example #3" # The following example will close the desktop named "Left Monitor" system.gui.closeDesktop("Left Monitor") ```