Skip to main content
Tensorlake ships 2 managed desktop images for sandboxes. Use tensorlake/ubuntu-vnc for browser automation and computer-use agents, and tensorlake/omarchy when you want the Omarchy desktop in a VNC client. This guide builds on Sandboxes. The 2 images differ in their desktop and VNC login: The SDK desktop examples on this page use tensorlake/ubuntu-vnc. To use Omarchy, see Omarchy Desktop Sandboxes.

Prerequisites

Ubuntu Desktop Sandboxes

tensorlake/ubuntu-vnc is a managed desktop image for browser automation and computer-use agents. It boots XFCE, TigerVNC, and Firefox for you, and the SDK connects through the authenticated sandbox proxy so you can drive the desktop without manually exposing port 5901. Its VNC password is tensorlake. If you specifically want to automate Chrome rather than the desktop, see Drive Chrome over CDP. It pairs tensorlake/ubuntu-vnc with a tunnel so Playwright, Puppeteer, or chrome-devtools-mcp can drive the in-sandbox browser as if it were running locally.

Launch a Desktop Sandbox

Use tensorlake/ubuntu-vnc when you want a full Linux desktop instead of a shell-only environment.
You still get a normal Sandbox object back, so computer use fits naturally alongside run(), file operations, PTY sessions, snapshots, and tunnels.

Capture Screenshots

Once the sandbox is running, attach to the desktop and save a PNG. This is the easiest way to inspect the layout and discover click coordinates before sending pointer events. Fresh desktop sandboxes can take a few seconds to finish starting XFCE and other desktop services. If your first screenshot is blank or input does not land where you expect, wait briefly after connecting and then retry.

Send Keyboard and Mouse Input

The desktop client supports keyboard shortcuts, typed input, clicks, double-clicks, mouse movement, and scrolling. The example below uses a reliable keyboard-driven flow: open a terminal, type a command, and then verify the result from the sandbox shell.
Coordinate-based actions are screen-relative. A common workflow is:
  1. Take a screenshot.
  2. Inspect the desktop layout and note the coordinates you care about.
  3. Use move_mouse() / moveMouse(), click(), double_click() / doubleClick(), and scroll() with those coordinates.

Reconnect to an Existing Sandbox

If a sandbox is already running, connect by sandbox ID and attach to the desktop without creating a new VM.
Connecting to an existing sandbox only closes the client connection when you are done. It does not terminate the running VM.

Connect with a VNC Client

If you want to drive the desktop from a real VNC viewer (Screen Sharing on macOS, TigerVNC, RealVNC, Remmina, etc.) rather than the SDK, open a TCP tunnel to the sandbox’s VNC port and point your client at the local end. The tunnel keeps sandbox-proxy authentication local, so you do not need to expose 5901 publicly. Open the tunnel with tl sbx tunnel. Replace <sandbox-id> with the id printed by tl sbx create (or tl sbx ls):
Leave that command running. It forwards 127.0.0.1:15901 on your machine to port 5901 inside the sandbox over an authenticated WebSocket. Then connect any VNC client to 127.0.0.1:15901 using the desktop password tensorlake. Use 127.0.0.1 rather than localhost: the tunnel listens on IPv4 only, and macOS can resolve localhost to the IPv6 address ::1 first.
Use the built-in Screen Sharing client:
Enter tensorlake when macOS prompts for the password.
Stop the tunnel with Ctrl+C when you are done. Closing the tunnel does not terminate the sandbox; reopen it any time with the same command.

Use noVNC in the Browser

If you want a human to interact with the sandbox desktop in real time, use a real VNC client in the browser instead of polling screenshots. noVNC is a good fit here. The recommended architecture is:
  1. Keep the Tensorlake API key on your backend.
  2. Use the backend to open a TCP tunnel to the sandbox’s VNC port 5901.
  3. Bridge that local tunnel to a browser WebSocket endpoint such as /vnc/<session-id>.
  4. Point noVNC at your backend WebSocket and authenticate with the desktop password tensorlake.
This keeps sandbox proxy authentication server-side and gives the browser a low-latency live desktop stream. You do not need to expose port 5901 publicly yourself. If you are also running an agent loop, a good pattern is to use:
  • noVNC for the live human-facing desktop stream
  • sandbox.connectDesktop() for screenshots and high-level computer-use actions on the backend
That separation avoids turning the browser view into a screenshot polling loop.

Browser Client with noVNC

Install noVNC in your frontend:
Then connect the browser to your own WebSocket bridge:
Use a fixed-size container for the desktop surface:

Desktop API Surface

Python uses snake_case, while JavaScript uses camelCase, but both SDKs expose the same core capabilities:
  • Screenshots: screenshot()
  • Mouse input: move_mouse() / moveMouse(), mouse_press() / mousePress(), mouse_release() / mouseRelease(), click(), double_click() / doubleClick(), scroll(), scroll_up() / scrollUp(), and scroll_down() / scrollDown()
  • Keyboard input: key_down() / keyDown(), key_up() / keyUp(), press(), and type_text() / typeText()
  • Desktop size: width and height
connect_desktop() and connectDesktop() go through the authenticated sandbox proxy, so you do not need to bind or expose the VNC port yourself. For interactive debugging through a real VNC viewer, see Connect with a VNC Client above.

Omarchy Desktop Sandboxes

tensorlake/omarchy runs the Omarchy desktop: Arch Linux with the Hyprland tiling window manager, Chromium, and Omarchy’s own apps, themes, and keyboard shortcuts. You connect to it with a VNC client through a tunnel. Each Omarchy sandbox generates its own VNC password, so read the password from the sandbox before you connect.
1

Launch an Omarchy sandbox

This requests 4 CPUs, 4 GiB of memory, and a 32 GiB root disk, the size of the Omarchy image. tl sbx create prints the sandbox ID. Use it in place of your_sandbox_id in the next steps.
2

Read the VNC password

Omarchy generates the password the first time its desktop starts. Read it with tl sbx exec:
If the command prints nothing, the desktop is still starting. Wait a few seconds and run it again. The password stays the same for the life of the sandbox, and snapshots of the sandbox keep it.
3

Open a tunnel to the VNC port

Leave the command running. It forwards 127.0.0.1:15901 on your machine to port 5901 inside the sandbox.
4

Connect your VNC client

On macOS, open the built-in Screen Sharing client:
Log in with these details:
  • Password: the value from the second step
  • Username: tl-user, if your client asks for one
  • Classic VNC clients: enter only the first 8 characters of the password, because classic VNC authentication reads 8
Use 127.0.0.1 rather than localhost: the tunnel listens on IPv4 only, and macOS can resolve localhost to the IPv6 address ::1 first.
Stop the tunnel with Ctrl+C when you are done. Closing the tunnel does not terminate the sandbox.

How Omarchy Behaves in a Sandbox

The image keeps the upstream Omarchy desktop, but the sandbox runtime owns the machine underneath it:
  • Networking: the sandbox runtime manages the network, so Omarchy’s network controls have no effect. Configure access with sandbox networking instead.
  • System updates: Omarchy’s snapshot, rollback, bootloader, and kernel update tools don’t manage the sandbox. Tensorlake updates the image itself.
  • Display: the desktop starts at 1280×800. Edit ~/.config/hypr/monitors.lua in the sandbox to change the resolution.

Stream Desktop Audio

Both desktop images stream the desktop’s audio as mono 48 kHz Opus in an Ogg container on port 5902. The stream has no password of its own, so open it only through a tunnel and never expose port 5902 with --expose:
Leave the tunnel running, then play the stream in another terminal with ffplay, which ships with FFmpeg:
  • Drive Chrome over CDP: point Playwright, Puppeteer, or chrome-devtools-mcp at the Chrome that ships in tensorlake/ubuntu-vnc.
  • Local Tunnels: the tunneling primitive used by both the VNC viewer and Chrome CDP workflows.
  • Snapshots: fork warm desktops to parallelize agent runs without re-launching XFCE.