Open a desktop
Create a desktop VM using the default Ubuntu 22.04 image:Screenshot and resolution
screenshot() returns PNG bytes and optionally saves a file on your local machine. resize(width, height) accepts integer widths from 320 to 4096 and heights from 200 to 2160. The active browser viewer can resize the display again to match its window.
vm.desktop_url and vm.desktop.url return the stable desktop URL, not an authenticated entry session. Use vm.access_url(8080) when the port is protected.
Mouse and keyboard control
press() uses X11 key names such as Return, ctrl+l, and alt+Tab. write() pastes literal UTF-8 text. click() supports left, middle, and right buttons and counts from 1 to 3; scroll() supports up, down, left, and right with 1–100 steps.
Launch a GUI program and keep its managed process handle: