From ec0f7d2be412b780b53a30feaa90df0f287ac337 Mon Sep 17 00:00:00 2001 From: jochemwhite Date: Mon, 31 Aug 2026 18:24:12 +0200 Subject: [PATCH] fix: sync PRIMARY and CLIPBOARD X selections with autocutsel x11vnc's default cut-text bridging was the only clipboard mechanism in the container, and nothing mirrored the two X selections. OBS mixes Qt widgets (CLIPBOARD) with CEF browser docks, so a paste target could read the selection that was never set - which surfaced as "clipboard randomly does nothing" in the cloud OBS viewer. Run autocutsel for both selections so x11vnc's cut-text and every paste target inside OBS agree. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01Q2ZoWKCoNuPMqr9UJzRuWQ --- Dockerfile | 1 + entrypoint.sh | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/Dockerfile b/Dockerfile index 9f6ef0c..de188d6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,6 +39,7 @@ RUN apt-get update \ openbox \ x11vnc \ websockify \ + autocutsel \ wmctrl xdotool \ dbus-x11 \ pulseaudio pulseaudio-utils \ diff --git a/entrypoint.sh b/entrypoint.sh index 253c54e..97ff6e0 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -260,6 +260,13 @@ as_app openbox & sleep 1 as_app xsetroot -solid black +# Mirror PRIMARY and CLIPBOARD selections. x11vnc's cut-text bridging and the +# mix of Qt (CLIPBOARD) and CEF widgets inside OBS each favor one selection; +# without a sync daemon a paste target can read the one that was never set, +# which shows up as "clipboard randomly does nothing" in the viewer. +as_app autocutsel -selection CLIPBOARD -fork +as_app autocutsel -selection PRIMARY -fork + cat > "$XDG/headless.pa" <<'PA' load-module module-native-protocol-unix load-module module-null-sink sink_name=obs_sink sink_properties=device.description=OBS_Output