Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@
"docs/billing"
]
},
{
"group": "Use cases",
"pages": [
"docs/use-cases/computer-use"
]
},
{
"group": "Code Interpreting",
"pages": [
Expand Down
18 changes: 18 additions & 0 deletions docs/template/examples/desktop.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
description: "Sandbox with Ubuntu Desktop and VNC access"
---

This template creates a sandbox with a full Ubuntu 22.04 desktop environment, including the XFCE desktop, common applications, and VNC streaming for remote access. It's ideal for building AI agents that need to interact with graphical user interfaces.

The template includes:
- **Ubuntu 22.04** with XFCE desktop environment
- **VNC streaming** via [noVNC](https://novnc.com/) for browser-based access
- **Pre-installed applications**: LibreOffice, text editors, file manager, and common utilities
- **Automation tools**: [xdotool](https://github.com/jordansissel/xdotool) and [scrot](https://github.com/resurrecting-open-source-projects/scrot) for programmatic desktop control

## Template Definition

The template installs the desktop environment, sets up VNC streaming via [x11vnc](https://github.com/LibVNC/x11vnc) and noVNC, and configures a startup script.

<CodeGroup>

Expand Down Expand Up @@ -79,6 +90,7 @@
"apt-get update",
"apt-get install -y \
xserver-xorg \
xorg \
x11-xserver-utils \
xvfb \
x11-utils \
Expand Down Expand Up @@ -131,6 +143,9 @@

</CodeGroup>

## Startup Script

The startup script initializes the virtual display using [Xvfb](https://www.x.org/releases/X11R7.6/doc/man/man1/Xvfb.1.xhtml) (X Virtual Framebuffer), launches the XFCE desktop session, starts the VNC server, and exposes the desktop via noVNC on port 6080. This script runs automatically when the sandbox starts.

Check warning on line 148 in docs/template/examples/desktop.mdx

View check run for this annotation

Mintlify / Mintlify Validation (e2b) - vale-spellcheck

docs/template/examples/desktop.mdx#L148

Did you really mean 'Framebuffer'?

```bash start_command.sh
#!/bin/bash
Expand All @@ -156,6 +171,9 @@
sleep 2
```

## Building the Template

Build the template with increased CPU and memory allocation to handle the desktop environment installation. The build process may take several minutes due to the size of the packages being installed.

<CodeGroup>

Expand Down
Loading