Skip to main content

Start a viewer

from nullspace import Sandbox

with Sandbox.create(template="desktop", timeout=300) as sandbox:
    stream = sandbox.desktop.stream.start(view_only=False)
    print(stream.viewer_url)

View-only mode

stream = sandbox.desktop.stream.start(view_only=True)
print(stream.viewer_url)
View-only mode is enforced by the viewer session, not just by the browser UI. Use it when you want someone to inspect a desktop without sending mouse, keyboard, or clipboard input back into the sandbox.

Auth key and raw stream info

info = sandbox.desktop.stream.info()
auth_key = sandbox.desktop.stream.get_auth_key()
viewer_url = sandbox.desktop.stream.get_viewer_url(auth_key)
print(info, viewer_url)
desktop.stream.info() exposes the current streaming surface for advanced clients. For browser sharing and inspection, prefer stream.viewer_url from start().

Capabilities

caps = sandbox.desktop.capabilities()
print(caps.streaming.managed_viewer)
print(caps.streaming.view_only)
print(caps.streaming.raw_vnc_mode)
Desktop deployments can expose different streaming modes. Public docs should use the managed viewer URL unless your deployment explicitly enables another mode.

Stop

sandbox.desktop.stream.stop()

Behavior

Viewer sessions are signed and temporary. Start or rotate a viewer session when you need a fresh URL. Clipboard access uses the viewer session token. A view-only viewer can copy text out when enabled by the deployment, but cannot inject input into the sandbox.