--- title: "system.gui.desktop" description: "Allows for invoking system.gui functions on a specific desktop." --- # system.gui.desktop > Allows for invoking system.gui functions on a specific desktop. This function is used in **Python Scripting**. ## Description See the [Multi-Monitor Clients](ignition-modules\vision\common-tasks-in-vision\multi-monitor-clients\multi-monitor-clients.md) page for more details. ## 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.gui.desktop(handle)` ### Parameters Type | Parameter | Description ------- | ------- | ------ String | `handle` | The handle for the desktop to use. 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 **WindowUtilities** - A copy of [system.gui](system-gui.md) ([WindowUtilities](https://sdk.inductiveautomation.com/javadoc/ignition81/latest/com/inductiveautomation/factorypmi/application/script/builtin/WindowUtilities.html)) that will be relative to the desktop named by the given handle. ### Scope Vision Client ## Code Examples ```python title="Example #1 - Opening Message Box in a Different Desktop" # The following example makes a message box appear on the primary desktop, # regardless of where the script originates. # system.gui.desktop() function requires a handle be passed to it for this example # to work properly. system.gui.desktop().messageBox("This will appear on the Primary Desktop") ``` ```python title="Example #2 - Showing Open Windows in a Specific Desktop" # Retrieves a list of open windows in a specific Desktop. This example assumes a desktop with the handle "2nd Desktop" exists. name = "2nd Desktop" # Returns a tuple of open windows in the Desktop named "2nd Desktop". windows = system.gui.desktop(name).getOpenedWindows() # Converts the tuple to a string, and shows the items in a message box. system.gui.messageBox(str(windows)) ```