dnut / clipboard-sync

Synchronizes the clipboard across multiple X11 and wayland instances running on the same machine.
63 stars 10 forks source link

Not detecting Wayland / Weston #39

Open powellnorma opened 1 month ago

powellnorma commented 1 month ago

I am starting weston from X11 like this:

export WAYLAND_DISPLAY=mysocket
weston --socket=$WAYLAND_DISPLAY --backend=x11-backend.so

When I now start clipboard-sync, it doesn't seem to find the wayland session, even when I ensure WAYLAND_DISPLAY is set correctly. It logs:

INFO - Using clipboards: [X11Clipboard { display: ":0" }]

wl-copy works fine: WAYLAND_DISPLAY=mysocket wl-copy "a test"

powellnorma commented 1 month ago

Looking at the source, it seems like clipboard-sync expects the environment variable to be wayland-X, where X is an digit: https://github.com/dnut/clipboard-sync/blob/a79e6ad41faafbeb0db974fc08b3a8e6207ac6d5/src/sync.rs#L195

So I now am using wayland-0, but get:

WARN - wayland-0 does not support zwlr_data_control_manager_v1. If you are running gnome in wayland, that's OK because it provides an x11 clipboard, which will be used instead.
powellnorma commented 1 month ago

Looks like Weston does not support zwlr_data_control_manager_v1 currently.. Any workarounds? https://wayland.app/protocols/wlr-data-control-unstable-v1#compositor-support

powellnorma commented 1 month ago

https://gitlab.freedesktop.org/wayland/weston/-/issues/955

powellnorma commented 1 month ago

I tried cage, however it fails with

00:00:00.000 [backend/x11/backend.c:607] Failed to query DRI3 DRM FD
00:00:00.000 [../cage.c:311] Unable to create the wlroots backend

(Due to https://forums.developer.nvidia.com/t/dri3open-missing-in-the-x11-driver-for-wlroots-compositors/214164/2)

powellnorma commented 1 month ago

I think even if zwlr_data_control_manager_v1 is not supported, it would still be nice if clipboard-sync would paste into that wayland session (but not watch for clipboard changes, since that's not possible)