> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hopx.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Desktop Automation

> Complete guide to desktop automation in HopX sandboxes - VNC, screenshots, mouse, keyboard, and window management. Automate desktop interactions with VNC servers, capture screenshots and screen recordings, control mouse and keyboard, manage windows and displays, and use clipboard operations. Includes Python and JavaScript SDK examples.

Automate desktop interactions in HopX sandboxes with VNC, screenshots, mouse and keyboard control, and window management. This hub covers all desktop automation features.

## Related

* [CLI Reference](/cli/introduction) - Command-line interface

## What You'll Learn

* How to set up and use VNC servers
* How to capture screenshots and screen recordings
* How to control mouse and keyboard
* How to manage windows and displays
* How to use clipboard and advanced X11 features

## Desktop Automation Overview

| Feature                                                           | SDK Method                     | API Endpoint         |
| ----------------------------------------------------------------- | ------------------------------ | -------------------- |
| **[VNC Server](/core-concepts/desktop/vnc-server)**               | `sandbox.desktop.vnc`          | VNC endpoints        |
| **[Screenshots](/core-concepts/desktop/screenshots)**             | `sandbox.desktop.screenshot()` | Screenshot endpoints |
| **[Mouse Control](/core-concepts/desktop/mouse-control)**         | `sandbox.desktop.mouse`        | Mouse endpoints      |
| **[Keyboard Control](/core-concepts/desktop/keyboard-control)**   | `sandbox.desktop.keyboard`     | Keyboard endpoints   |
| **[Window Management](/core-concepts/desktop/window-management)** | `sandbox.desktop.windows`      | Window endpoints     |
| **[Advanced X11](/core-concepts/desktop/x11-advanced)**           | Advanced X11                   | X11 endpoints        |

## Core Concepts

### VNC Server

Set up and connect to VNC servers for remote desktop access.

* **[VNC Server](/core-concepts/desktop/vnc-server)** - Set up VNC servers
* **SDK**: [Python: sandbox.desktop.vnc](/sdk/python/desktop#vnc) | [JavaScript: sandbox.desktop.vnc](/sdk/javascript/desktop#vnc)
* **API**: VNC server endpoints

### Screenshots

Capture screenshots and screen recordings from sandboxes.

* **[Screenshots](/core-concepts/desktop/screenshots)** - Capture screenshots
* **[Screen Recording](/core-concepts/desktop/screen-recording)** - Record screen activity
* **SDK**: [Python: sandbox.desktop.screenshot()](/sdk/python/desktop#screenshot) | [JavaScript: sandbox.desktop.screenshot()](/sdk/javascript/desktop#screenshot)
* **API**: Screenshot endpoints

### Mouse Control

Control mouse movements, clicks, and gestures.

* **[Mouse Control](/core-concepts/desktop/mouse-control)** - Control mouse interactions
* **SDK**: [Python: sandbox.desktop.mouse](/sdk/python/desktop#mouse) | [JavaScript: sandbox.desktop.mouse](/sdk/javascript/desktop#mouse)
* **API**: Mouse control endpoints

### Keyboard Control

Send keyboard input and key combinations.

* **[Keyboard Control](/core-concepts/desktop/keyboard-control)** - Control keyboard input
* **SDK**: [Python: sandbox.desktop.keyboard](/sdk/python/desktop#keyboard) | [JavaScript: sandbox.desktop.keyboard](/sdk/javascript/desktop#keyboard)
* **API**: Keyboard control endpoints

### Window Management

Manage windows, displays, and desktop layout.

* **[Window Management](/core-concepts/desktop/window-management)** - Manage windows
* **[Display Management](/core-concepts/desktop/display-management)** - Manage displays
* **SDK**: [Python: sandbox.desktop.windows](/sdk/python/desktop#windows) | [JavaScript: sandbox.desktop.windows](/sdk/javascript/desktop#windows)
* **API**: Window management endpoints

### Advanced X11

Advanced X11 features for desktop automation.

* **[Advanced X11](/core-concepts/desktop/x11-advanced)** - Advanced X11 features
* **SDK**: [Python: sandbox.desktop.x11](/sdk/python/desktop#x11) | [JavaScript: sandbox.desktop.x11](/sdk/javascript/desktop#x11)
* **API**: X11 endpoints

### Clipboard

Access and manipulate clipboard contents.

* **[Clipboard](/core-concepts/desktop/clipboard)** - Clipboard operations
* **SDK**: [Python: sandbox.desktop.clipboard](/sdk/python/desktop#clipboard) | [JavaScript: sandbox.desktop.clipboard](/sdk/javascript/desktop#clipboard)
* **API**: Clipboard endpoints

## SDK Reference

### Python SDK

Complete reference for Python desktop automation.

* **[Desktop Module](/sdk/python/desktop)** - Complete desktop automation API
  * `desktop.vnc` - VNC server
  * `desktop.screenshot()` - Screenshots
  * `desktop.mouse` - Mouse control
  * `desktop.keyboard` - Keyboard control
  * `desktop.windows` - Window management
  * `desktop.clipboard` - Clipboard
  * `desktop.x11` - Advanced X11

### JavaScript SDK

Complete reference for JavaScript/TypeScript desktop automation.

* **[Desktop Module](/sdk/javascript/desktop)** - Complete desktop automation API
  * `desktop.vnc` - VNC server
  * `desktop.screenshot()` - Screenshots
  * `desktop.mouse` - Mouse control
  * `desktop.keyboard` - Keyboard control
  * `desktop.windows` - Window management
  * `desktop.clipboard` - Clipboard
  * `desktop.x11` - Advanced X11

## API Reference

### VM Agent API

REST API endpoints for desktop automation.

* **[VM Agent API Overview](/api/vm-agent/overview)** - API overview
* Desktop automation endpoints (VNC, screenshots, mouse, keyboard, windows)

## Quick Start

If you're new to desktop automation, start here:

1. **[VNC Server](/core-concepts/desktop/vnc-server)** - Set up VNC access
2. **[Screenshots](/core-concepts/desktop/screenshots)** - Capture your first screenshot
3. **[Mouse Control](/core-concepts/desktop/mouse-control)** - Control mouse interactions

## Related Topics

* **[Sandboxes](/core-concepts/sandboxes/creating)** - Create sandboxes for desktop automation
* **[Code Execution](/core-concepts/code-execution/synchronous)** - Execute code with desktop access
* **[Terminal](/core-concepts/terminal/websocket)** - Terminal access alongside desktop
* **[Observability](/core-concepts/observability/metrics)** - Monitor desktop performance

## Next Steps

* Learn about [VNC Server](/core-concepts/desktop/vnc-server) for remote desktop access
* Explore [Screenshots](/core-concepts/desktop/screenshots) for visual capture
* Review [Mouse Control](/core-concepts/desktop/mouse-control) and [Keyboard Control](/core-concepts/desktop/keyboard-control) for automation
* Check out [Advanced X11](/core-concepts/desktop/x11-advanced) for advanced features
