コンテンツにスキップ

VNC Access

View as Markdown

このコンテンツはまだ日本語訳がありません。

VNC (Virtual Network Computing) access provides a graphical desktop environment for your Daytona Sandbox directly in the browser. This allows you to interact with GUI applications, desktop tools, and visual interfaces running inside your sandbox.

VNC and Computer Use work together to enable both manual and automated desktop interactions. VNC provides the visual interface for users to manually interact with the desktop, while Computer Use provides the programmatic API for AI agents to automate mouse, keyboard, and screenshot operations. Through VNC, you can observe AI agents performing automated tasks via Computer Use in real-time.

  • GUI application development: build and test desktop applications with visual interfaces
  • Browser testing: run and debug web applications in a full browser environment
  • Visual debugging: inspect graphical output and UI behavior in real-time
  • Desktop tool access: use graphical IDEs, design tools, or other desktop software
  • Agent observation: watch AI agents perform automated tasks through Computer Use

Access VNC from Dashboard

Access the VNC desktop environment directly from the Daytona Dashboard ↗.

  1. Navigate to Daytona Sandboxes ↗
  2. Locate the sandbox you want to access via VNC
  3. Click the options menu () next to the sandbox
  4. Select VNC from the dropdown menu

This opens a VNC viewer in your browser with a Connect button.

  1. Click Connect to establish the VNC session

Once connected, a full desktop environment loads in your browser, providing mouse and keyboard control over the sandbox’s graphical interface.

Programmatic VNC management

Daytona provides methods to start, stop, and monitor VNC sessions and processes programmatically using the Computer Use references as part of automated workflows.

Start VNC

Start all VNC processes (Xvfb, xfce4, x11vnc, novnc) in the sandbox to enable desktop access.

result = sandbox.computer_use.start()
print("VNC processes started:", result.message)

For more information, see the Computer Use reference.

start (Python SDK)

start (TypeScript SDK)

start (Ruby SDK)

Start (Go SDK)

Start Computer Use Processes (API)

Stop VNC

Stop all VNC processes in the sandbox.

result = sandbox.computer_use.stop()
print("VNC processes stopped:", result.message)

For more information, see the Computer Use reference.

stop (Python SDK)

stop (TypeScript SDK)

stop (Ruby SDK)

Stop (Go SDK)

Stop Computer Use Processes (API)

Get VNC status

Check the status of VNC processes to verify they are running.

response = sandbox.computer_use.get_status()
print("VNC status:", response.status)

For more information, see the Computer Use reference.

get_status (Python SDK)

getStatus (TypeScript SDK)

status (Ruby SDK)

GetStatus (Go SDK)

Get Computer Use Status (API)

For additional process management operations including restarting individual processes and viewing logs, see the Computer Use reference.

Automating desktop interactions

Once VNC is running, you can automate desktop interactions using Computer Use. This enables AI agents to programmatically control the mouse, keyboard, and capture screenshots within the VNC session.

Available operations:

  • Mouse: click, move, drag, scroll, and get cursor position
  • Keyboard: type text, press keys, and execute hotkey combinations
  • Screenshot: capture full screen, regions, or compressed images
  • Display: get display information and list open windows

For complete documentation on automating desktop interactions, see Computer Use.

Example: Automated browser interaction

# Start VNC processes
sandbox.computer_use.start()
# Click to open browser
sandbox.computer_use.mouse.click(50, 50)
# Type a URL
sandbox.computer_use.keyboard.type("https://www.daytona.io/docs/")
sandbox.computer_use.keyboard.press("Return")
# Take a screenshot
screenshot = sandbox.computer_use.screenshot.take_full_screen()

Required packages

The default sandbox image includes all packages required for VNC and Computer Use. If you are using a custom image, you need to install the following packages.

VNC and desktop environment

PackageDescription
xvfbX Virtual Framebuffer for headless display
xfce4Desktop environment
xfce4-terminalTerminal emulator
x11vncVNC server
novncWeb-based VNC client
dbus-x11D-Bus session support

X11 libraries

LibraryDescription
libx11-6X11 client library
libxrandr2X11 RandR extension (display configuration)
libxext6X11 extensions library
libxrender1X11 rendering extension
libxfixes3X11 fixes extension
libxss1X11 screen saver extension
libxtst6X11 testing extension (input simulation)
libxi6X11 input extension