bugaevc / wl-clipboard

Command-line copy/paste utilities for Wayland
GNU General Public License v3.0
1.62k stars 60 forks source link

Failed to connect to a Wayland server #114

Closed virus-found closed 3 years ago

virus-found commented 3 years ago

Hi.

This is strace for wl-copy: https://0x0.st/-cQM.txt

Line 62 of the log says:

connect(3, {sa_family=AF_UNIX, sun_path="/tmp//wayland-0"}, 18) = -1 ENOENT (No such file or directory)

But the needed file seems to have another name:

+5:13% echo $XDG_RUNTIME_DIR
/tmp/
+5:15% ls -la /tmp/w*
srwxr-xr-x 1 gargantua gargantua 0  5. Apr 14:22 /tmp/wayland-1
-rw-r----- 1 gargantua gargantua 0  5. Apr 14:22 /tmp/wayland-1.lock

How do I fix this then? :)

bugaevc commented 3 years ago

Set WAYLAND_DISPLAY=wayland-1, and investigate why your environment doesn't set it automatically.

Btw, thanks for the very clear report, this is much better than I normally get.

virus-found commented 3 years ago

Set WAYLAND_DISPLAY=wayland-1, and investigate why your environment doesn't set it automatically.

Btw, thanks for the very clear report, this is much better than I normally get.

Thanks, that helped. Didn't know about that variable and will be investigating :)