Skip to main content

Ubuntu 24.04 Desktop VM (Xfce4) for quicksand

Project description

Quicksand Ubuntu Desktop

Pre-built Ubuntu 24.04 Desktop VM image with Xfce4 for the quicksand agent harness. Gives your agent a full graphical Linux desktop with keyboard, mouse, and screenshot control.

Installation

pip install quick-sandbox
quicksand install ubuntu-desktop

Usage

import asyncio
from quicksand import Key
from quicksand_ubuntu_desktop import UbuntuDesktopSandbox

async def main():
    async with UbuntuDesktopSandbox() as sb:
        # Take a screenshot
        await sb.screenshot("desktop.png")

        # Type text and press keys
        await sb.type_text("echo hello world")
        await sb.press_key(Key.RET)

        # Mouse control (absolute coordinates 0-32767)
        await sb.mouse_move(16383, 16383)
        await sb.mouse_click()

        # execute() still works alongside GUI input
        result = await sb.execute("uname -a")
        print(result.stdout)

asyncio.run(main())

With custom config

from quicksand_ubuntu_desktop import UbuntuDesktopSandbox

async with UbuntuDesktopSandbox(memory="4G", cpus=4) as sb:
    await sb.screenshot("desktop.png")

What's Included

  • Ubuntu 24.04 with Xfce4 desktop + LightDM (auto-login, no password prompt)
  • Firefox ESR browser
  • Full apt/deb ecosystem
  • Python 3, bash, curl, ca-certificates
  • The quicksand guest agent (pre-installed)
  • Software rendering via Mesa (LIBGL_ALWAYS_SOFTWARE=1)

Default Config

Setting Default
Memory 1G
CPUs 2
Display Enabled (always)
Boot timeout 60s
Init system systemd

Desktop API

All methods are async:

  • await screenshot(path) — save the guest display as a PNG
  • await type_text(text) — type a string via keyboard events
  • await press_key(*keys) — press a key combo, e.g. press_key(Key.CTRL, Key.C)
  • await mouse_move(x, y) — move mouse to absolute position (0-32767 range)
  • await mouse_click(button, double=False) — click "left", "right", "middle", "wheel-up", or "wheel-down"
  • await query_display_size() — get display resolution as (width, height)
  • await execute(cmd) — run a shell command (same as headless sandboxes)
  • vnc_port — host-side VNC port for connecting a viewer

All standard sandbox features (mounts, save/load, network config) work with desktop sandboxes too.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

quicksand_ubuntu_desktop-0.10.0a1-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file quicksand_ubuntu_desktop-0.10.0a1-py3-none-any.whl.

File metadata

  • Download URL: quicksand_ubuntu_desktop-0.10.0a1-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for quicksand_ubuntu_desktop-0.10.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 2f0cedc2c8228b7694dd5053c523e96823f6d1ef8067de247720861ce290be37
MD5 00745377100f2f471f63f27b6ec6fd64
BLAKE2b-256 1e83e27c36e8e4f626c7029eecbb0158a327d2ac06dd9a5a3cd1f4eb59a4ded1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page