Remote Desktop Testing on Linux
Overview
Generic Daytona Linux desktop sandbox driver. It creates (or reuses) a sandbox running an
xfce4 desktop streamed over noVNC, and provides the primitives for visual testing of any
GUI app: sync code, run shell commands, launch GUI programs on the live desktop, screenshot,
record video, and mint a clickable desktop link a teammate can open to drive the app.
When to Use
- Demo or visually verify a GUI app (Electron, browser, native X11) on Linux without a local Linux desktop
- Produce a screenshot + video + clickable live-desktop link for a teammate
- Debug Linux-specific desktop behavior of a cross-platform app
- Run throwaway desktop sessions that are fully disposable (stop with
cleanup)
Usage
Run the bundled script with Node from the skill directory:
node scripts/remote-desktop.mjs <command> [options]
Credentials: DAYTONA_API_KEY (and optionally DAYTONA_API_URL/DAYTONA_TARGET) from the
environment or a dotenv file — ./.env by default, override with --env-path <file>.
The script auto-installs @daytona/sdk under ~/.letta/skill-state/remote-desktop-testing-linux/
on first use and remembers the active sandbox id there, so later commands don't need --sandbox.
Typical flow
# 1. Start (or reuse) a desktop sandbox. Default: image daytonaio/sandbox:0.8.0, cpu 2 / mem 4 / disk 5.
node scripts/remote-desktop.mjs start
# 2. (Optional) push a local project to /home/daytona/remote-desktop/workspace
node scripts/remote-desktop.mjs sync --project-path ~/repos/my-app --sync-mode working_tree
# 3. Set up / build with shell commands (runs bash in the sandbox)
node scripts/remote-desktop.mjs shell \
--command "cd /home/daytona/remote-desktop/workspace && npm install"
# 4. Launch the GUI app on the live desktop and verify its window appeared
node scripts/remote-desktop.mjs launch \
--command "./my-app --some-flag" --label my-app --wait-window "My App"
# 5. Deliverables: screenshot, video, and a clickable live-desktop link
node scripts/remote-desktop.mjs screenshot --output /tmp/demo.png
node scripts/remote-desktop.mjs record --output /tmp/demo.mp4 --mp4 --duration 12
node scripts/remote-desktop.mjs preview
Always confirm the result visually (open the screenshot, or check windows / --wait-window)
before reporting success — never report success from process existence alone. When sharing with
a teammate, send the desktopUrl from preview (signed noVNC link, expires ~6h; re-run
preview to refresh). Pass --port <n> to preview to also mint a signed URL for an app's
HTTP port.
Commands
| Command |
What it does |
start |
Create/reuse a sandbox and start the desktop. --fresh forces a new one. |
sync |
Sync --project-path to /home/daytona/remote-desktop/workspace (git_archive = committed HEAD, working_tree = uncommitted too; preserves remote node_modules). |
shell --command SH |
Run a bash command. --timeout <s> for long ones. |
launch --command CMD |
Launch a GUI command on the xfce4 desktop (detached, DISPLAY set, logged to /home/daytona/remote-desktop/launch-<label>.log). --wait-window <regex> verifies a matching window title appears. |
windows |
List visible desktop windows. |
screenshot |
Save a PNG of the full desktop locally. |
preview |
Print signed desktopUrl (noVNC), plus appUrl if --port given. |
record |
Record the live desktop via Playwright + local Chrome (--duration <s>, --mp4). |
recording-start/stop/download |
Native Daytona recording (installs ffmpeg in-sandbox on first use). |
snapshot --snapshot <name> |
Bake the sandbox into a snapshot (stops, snapshots, restarts). |
cleanup |
Stop the active sandbox. |
Sizing and snapshots
- Daytona's default Linux sandbox is tiny (cpu 1 / mem 1 / disk 3GB). This skill creates
from the desktop-capable image
daytonaio/sandbox:0.8.0 with --cpu 2 --memory 4 --disk 5
by default; raise them for big projects (--cpu 4 --memory 8 --disk 10). Disk is capped at
10GB per sandbox.
resources cannot be combined with a snapshot — --snapshot <name> creates with whatever
size was baked in. Use snapshot to bake a prepared box (deps installed, caches warm) so
future start --snapshot <name> runs skip setup. Revert throwaway edits before baking.
Gotchas
- Electron/Chromium apps need
--no-sandbox inside the container, and often
--disable-gpu --disable-dev-shm-usage too; put those flags in your launch --command.
launch runs the command detached with DISPLAY pointed at the live desktop (detected from
/tmp/.X11-unix, falls back to :0). Check the launch log via shell if nothing appears.
- For the shareable link, send
desktopUrl (the interactive desktop), not a raw app-port URL —
the app URL only serves HTTP and shows nothing of the desktop.
record runs Playwright locally: it resolves playwright/playwright-core from
--project-path first, else auto-installs playwright-core into skill state, and drives the
local Chrome binary (--chrome-path, default macOS Chrome). --mp4 needs local ffmpeg.
- The base image has
xfce4-terminal, chromium, and xeyes available for quick desktop
sanity checks (e.g. launch --command "xfce4-terminal" --wait-window Terminal).
1---
2name: remote-desktop-testing-linux
3description: Test any GUI app or change on a Daytona Linux (Ubuntu xfce4 + noVNC) remote desktop sandbox. Use to launch a GUI program, sync a local project, take a screenshot, record a video, or share a clickable live-desktop link with a teammate. Generic — the only dependency is Daytona. For Windows, use remote-desktop-testing-windows.
4metadata:
5 source: https://skillmd.com/skills/letta-ai/remote-desktop-testing-linux
6---
7
8# Remote Desktop Testing on Linux
9
10## Overview
11
12Generic Daytona Linux desktop sandbox driver. It creates (or reuses) a sandbox running an
13xfce4 desktop streamed over noVNC, and provides the primitives for visual testing of any
14GUI app: sync code, run shell commands, launch GUI programs on the live desktop, screenshot,
15record video, and mint a clickable desktop link a teammate can open to drive the app.
16
17## When to Use
18
19- Demo or visually verify a GUI app (Electron, browser, native X11) on Linux without a local Linux desktop
20- Produce a screenshot + video + clickable live-desktop link for a teammate
21- Debug Linux-specific desktop behavior of a cross-platform app
22- Run throwaway desktop sessions that are fully disposable (stop with `cleanup`)
23
24## Usage
25
26Run the bundled script with Node from the skill directory:
27
28```bash
29node scripts/remote-desktop.mjs <command> [options]
30```
31
32Credentials: `DAYTONA_API_KEY` (and optionally `DAYTONA_API_URL`/`DAYTONA_TARGET`) from the
33environment or a dotenv file — `./.env` by default, override with `--env-path <file>`.
34The script auto-installs `@daytona/sdk` under `~/.letta/skill-state/remote-desktop-testing-linux/`
35on first use and remembers the active sandbox id there, so later commands don't need `--sandbox`.
36
37## Typical flow
38
39```bash
40# 1. Start (or reuse) a desktop sandbox. Default: image daytonaio/sandbox:0.8.0, cpu 2 / mem 4 / disk 5.
41node scripts/remote-desktop.mjs start
42
43# 2. (Optional) push a local project to /home/daytona/remote-desktop/workspace
44node scripts/remote-desktop.mjs sync --project-path ~/repos/my-app --sync-mode working_tree
45
46# 3. Set up / build with shell commands (runs bash in the sandbox)
47node scripts/remote-desktop.mjs shell \
48 --command "cd /home/daytona/remote-desktop/workspace && npm install"
49
50# 4. Launch the GUI app on the live desktop and verify its window appeared
51node scripts/remote-desktop.mjs launch \
52 --command "./my-app --some-flag" --label my-app --wait-window "My App"
53
54# 5. Deliverables: screenshot, video, and a clickable live-desktop link
55node scripts/remote-desktop.mjs screenshot --output /tmp/demo.png
56node scripts/remote-desktop.mjs record --output /tmp/demo.mp4 --mp4 --duration 12
57node scripts/remote-desktop.mjs preview
58```
59
60Always confirm the result visually (open the screenshot, or check `windows` / `--wait-window`)
61before reporting success — never report success from process existence alone. When sharing with
62a teammate, send the `desktopUrl` from `preview` (signed noVNC link, expires ~6h; re-run
63`preview` to refresh). Pass `--port <n>` to `preview` to also mint a signed URL for an app's
64HTTP port.
65
66## Commands
67
68| Command | What it does |
69| --- | --- |
70| `start` | Create/reuse a sandbox and start the desktop. `--fresh` forces a new one. |
71| `sync` | Sync `--project-path` to `/home/daytona/remote-desktop/workspace` (`git_archive` = committed HEAD, `working_tree` = uncommitted too; preserves remote `node_modules`). |
72| `shell --command SH` | Run a bash command. `--timeout <s>` for long ones. |
73| `launch --command CMD` | Launch a GUI command on the xfce4 desktop (detached, `DISPLAY` set, logged to `/home/daytona/remote-desktop/launch-<label>.log`). `--wait-window <regex>` verifies a matching window title appears. |
74| `windows` | List visible desktop windows. |
75| `screenshot` | Save a PNG of the full desktop locally. |
76| `preview` | Print signed `desktopUrl` (noVNC), plus `appUrl` if `--port` given. |
77| `record` | Record the live desktop via Playwright + local Chrome (`--duration <s>`, `--mp4`). |
78| `recording-start/stop/download` | Native Daytona recording (installs ffmpeg in-sandbox on first use). |
79| `snapshot --snapshot <name>` | Bake the sandbox into a snapshot (stops, snapshots, restarts). |
80| `cleanup` | Stop the active sandbox. |
81
82## Sizing and snapshots
83
84- Daytona's **default Linux sandbox is tiny (cpu 1 / mem 1 / disk 3GB)**. This skill creates
85 from the desktop-capable image `daytonaio/sandbox:0.8.0` with `--cpu 2 --memory 4 --disk 5`
86 by default; raise them for big projects (`--cpu 4 --memory 8 --disk 10`). Disk is capped at
87 **10GB per sandbox**.
88- `resources` cannot be combined with a snapshot — `--snapshot <name>` creates with whatever
89 size was baked in. Use `snapshot` to bake a prepared box (deps installed, caches warm) so
90 future `start --snapshot <name>` runs skip setup. Revert throwaway edits before baking.
91
92## Gotchas
93
94- Electron/Chromium apps need `--no-sandbox` inside the container, and often
95 `--disable-gpu --disable-dev-shm-usage` too; put those flags in your `launch --command`.
96- `launch` runs the command detached with `DISPLAY` pointed at the live desktop (detected from
97 `/tmp/.X11-unix`, falls back to `:0`). Check the launch log via `shell` if nothing appears.
98- For the shareable link, send `desktopUrl` (the interactive desktop), not a raw app-port URL —
99 the app URL only serves HTTP and shows nothing of the desktop.
100- `record` runs Playwright locally: it resolves `playwright`/`playwright-core` from
101 `--project-path` first, else auto-installs `playwright-core` into skill state, and drives the
102 local Chrome binary (`--chrome-path`, default macOS Chrome). `--mp4` needs local ffmpeg.
103- The base image has `xfce4-terminal`, `chromium`, and `xeyes` available for quick desktop
104 sanity checks (e.g. `launch --command "xfce4-terminal" --wait-window Terminal`).