fix(desktop): forward DISPLAY/Wayland and use host network in cargo-desktop #27

Merged
nrupard merged 1 commit from fix/desktop-display-forwarding into main 2026-05-04 16:40:42 +02:00
Owner

just dev-desktop ran the desktop binary inside the container with no DISPLAY, no Wayland socket, and no LETS_CHAT_SERVER_URL forwarded, so GTK aborted with "cannot open display" and the binary could not have reached a localhost dev server even if it had a window.

The wrapper now forwards LETS_CHAT_SERVER_URL when set, and when DISPLAY or WAYLAND_DISPLAY is set on the host it also enables --network=host and --ipc=host, mounts /tmp/.X11-unix and the Wayland XDG_RUNTIME_DIR socket, and forwards XAUTHORITY when present. Builds (cargo check, cargo clippy, cargo fmt) are unaffected because the extra args only attach when display env vars are set.

Also includes a cargo fmt --all run that touched routes/ws.rs and routes/room.rs.

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

just dev-desktop ran the desktop binary inside the container with no DISPLAY, no Wayland socket, and no LETS_CHAT_SERVER_URL forwarded, so GTK aborted with "cannot open display" and the binary could not have reached a localhost dev server even if it had a window. The wrapper now forwards LETS_CHAT_SERVER_URL when set, and when DISPLAY or WAYLAND_DISPLAY is set on the host it also enables --network=host and --ipc=host, mounts /tmp/.X11-unix and the Wayland XDG_RUNTIME_DIR socket, and forwards XAUTHORITY when present. Builds (cargo check, cargo clippy, cargo fmt) are unaffected because the extra args only attach when display env vars are set. Also includes a cargo fmt --all run that touched routes/ws.rs and routes/room.rs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
just dev-desktop ran the desktop binary inside the container with no DISPLAY, no Wayland socket, and no LETS_CHAT_SERVER_URL forwarded, so GTK aborted with "cannot open display" and the binary could not have reached a localhost dev server even if it had a window.

The wrapper now forwards LETS_CHAT_SERVER_URL when set, and when DISPLAY or WAYLAND_DISPLAY is set on the host it also enables --network=host and --ipc=host, mounts /tmp/.X11-unix and the Wayland XDG_RUNTIME_DIR socket, and forwards XAUTHORITY when present. Builds (cargo check, cargo clippy, cargo fmt) are unaffected because the extra args only attach when display env vars are set.

Also includes a cargo fmt --all run that touched routes/ws.rs and routes/room.rs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
nrupard deleted branch fix/desktop-display-forwarding 2026-05-04 16:40:42 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/lets-chat!27
No description provided.