Skip to main content

Open a desktop

Create a desktop VM using the default Ubuntu 22.04 image:
The desktop has a browser and Terminal launcher. On x86-64, the browser is Chrome; on ARM64 it is Firefox. Applications and user files live on the durable root. Desktop access uses port 8080. The CLI opens a fresh entry session for a protected desktop. To print the entry URL:
You can also open the desktop from the VM’s dashboard detail page. Keep its browser session private: desktop and terminal access run programs as root inside the VM. A desktop requires at least 2048 MiB RAM. The browser viewer resizes the guest display to its viewport. A larger display or video workload needs more CPU and bandwidth; VMs do not provide GPU acceleration.

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

Coordinates refer to guest display pixels. 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:

Record the guest screen

Record to an absolute path inside the VM, stop the recording cleanly, then download it:
Recording uses CPU encoding, with an FPS setting from 1 to 60. It is independent of the browser viewer’s frame rate. Use a new output path for each recording; existing files are not overwritten. Finish or stop the recording before stopping, pausing, or restarting the VM.

Desktop lifecycle

Use pause/resume to retain open applications in RAM. Stop/start boots a new desktop session while keeping installed software, launcher files, and user data. Reopen the desktop after a lifecycle operation, and generate a new entry URL if the protected session has expired. For service diagnostics: