OmniRunDocs

Desktop sandbox

Run a full Linux GUI desktop (XFCE) inside a Firecracker microVM. Control the desktop programmatically with mouse clicks, keyboard input, and screenshots, for AI computer use, visual testing, and GUI automation. Available in both TypeScript and Python SDKs.

XFCE desktopnoVNC on port 6080

Usage

const sb = await Sandbox.create('desktop');

// Take a screenshot
const png = await sb.desktop.screenshot();

// Click, type, and press keys
await sb.desktop.leftClick(512, 384);
await sb.desktop.type('hello world');
await sb.desktop.press('Return');

// Get screen info
const screen = await sb.desktop.getScreen();
// { width: 1024, height: 768 }

View examples

Examples

Web Browsing
Automated web browsing in a desktop sandbox — Firefox navigating to Hacker News and GitHub Trending
AI Agent (Computer Use)
AI agent autonomously writing and running Python code in a desktop sandbox
App Automation
Automated terminal interaction — typing and running a Python fizzbuzz program
Visual Testing
Visual regression testing — filling a login form and capturing screenshots

SDK reference

Methods on sandbox.desktop.

MethodWhat it does
screenshot()Capture the desktop as PNG
leftClick(x, y)Click at coordinates
rightClick(x, y)Right-click at coordinates
doubleClick(x, y)Double-click at coordinates
type(text)Type text character by character
press(key)Press a key or combo (e.g. "ctrl+c")
moveMouse(x, y)Move cursor to coordinates
scroll(dir, amount)Scroll up/down/left/right
drag(x1, y1, x2, y2)Drag from one point to another
getScreen()Get resolution and cursor position
getStreamInfo()Get noVNC connection details

Live desktop streaming

noVNC on port 6080. Every desktop sandbox runs noVNC on port 6080. Create a preview URL with sandbox.expose(6080) to get a shareable link for live desktop viewing in any browser, no VNC client needed.