Skip to content

Computer Use - Linux

Computer Use enables programmatic control of desktop environments within Daytona sandboxes. It provides mouse, keyboard, screenshot, and display operations for automating GUI interactions and testing desktop applications.

We recommend using this instance type for most tasks.

Common Use Cases

  • GUI Application Testing - Automate interactions with desktop applications, click buttons, fill forms, and validate UI behavior
  • Visual Testing & Screenshots - Capture screenshots of applications, compare UI states, and perform visual regression testing
  • Desktop Automation - Automate repetitive desktop tasks, file management through GUI, and complex workflows
  • Human-in-the-Loop - Access the VNC interface directly from the Daytona Dashboard to manually control and interact with the desktop environment alongside automated scripts

SDK References

Choose your preferred SDK to get started with computer use automation:

TypeScript SDK

Complete API reference for computer use operations in TypeScript.

View TypeScript SDK →

Python SDK

Complete API reference for computer use operations in Python (sync & async).

View Python SDK →

Quick Example

from daytona import Daytona
# Initialize using environment variables (recommended)
daytona = Daytona()
# Or explicitly configure:
# daytona = Daytona(
# api_key=os.getenv('DAYTONA_API_KEY'),
# api_url=os.getenv('DAYTONA_API_URL', 'https://app.daytona.io/api')
# )
# Create sandbox from default snapshot (includes desktop environment)
sandbox = daytona.create()
# Start computer use processes
result = sandbox.computer_use.start()
print("Computer use started:", result.message)
# Take a screenshot
screenshot = sandbox.computer_use.screenshot.take_full_screen()
# Click and type
sandbox.computer_use.mouse.click(100, 200)
sandbox.computer_use.keyboard.type('Hello, Linux!')
sandbox.computer_use.keyboard.hotkey('ctrl+s')

Environment Variables (.env file):

Terminal window
DAYTONA_API_KEY=your-api-key-here
DAYTONA_API_URL=https://app.daytona.io/api