YaLTeR / wl-clipboard-rs

A safe Rust crate for working with the Wayland clipboard.
Apache License 2.0
223 stars 16 forks source link

Couldn't connect to the Wayland compositor #37

Closed LGDHuaOPER closed 1 year ago

LGDHuaOPER commented 1 year ago

I exec that cmd:

WAYLAND_DEBUG=1 wl-copy whatever-you-were-doing

But got error:

Error: Couldn't connect to the Wayland compositor
Caused by:
    Could not find a listening wayland compositor.

I have install sudo apt-get install libwayland-dev and set export XDG_RUNTIME_DIR="$HOME/.wl-clipboard/temp". Why this?

My OS is:

PS C:\Users\HuaFEEng> wsl --list -v
NAME                   STATE           VERSION
* Ubuntu-20.04           Running         2   

huafeeng@Hua-Lenovo-DT:~$ uname -a
Linux Hua-Lenovo-DT 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux   

Thanks!

YaLTeR commented 1 year ago

Hey, as @bugaevc mentioned in https://github.com/bugaevc/wl-clipboard/issues/179, you need to be running a Wayland compositor for wl-clipboard to work :)