You are not logged in.

#1 2024-08-25 05:08:35

ReYuki
Member
Registered: 2024-07-30
Posts: 37
Website

[SOLVED] Sharing Clipboard Between Weston and Xorg

I’ve installed the wl-clipboard package and tried copying text from Xorg to a Weston window, but I encountered the following error:

[hemlo@ASUS ~]$   whoami
reyuki
[hemlo@ASUS ~]$    wl-copy "hellow world"
Failed to connect to a Wayland server: Connection refused
Note: WAYLAND_DISPLAY is set to /run/user/1000/
Note: XDG_RUNTIME_DIR is set to /run/user/1000/wayland-1
[hemlo@ASUS ~]$  ls -l /run/user/1000/wayland-1
srwxr-xr-x 1 reyuki reyuki 0 Aug 24 21:23 /run/user/1000/wayland-1
[hemlo@ASUS ~]$  file /run/user/1000/wayland-1
/run/user/1000/wayland-1: socket

Why am I getting a "connection refused" error? What is the correct way to share the clipboard between Weston and Xorg?

I found similar questions on the internet, but there doesn’t seem to be an answer yet:
- reddit
- superuser

Last edited by ReYuki (2024-08-31 00:56:53)


Some felt terror! some felt hatred! some trusted it! some were obsessed with it! The feelings in the hearts of all mankind were what drove them to follow the path of destruction! Just as all who live by the sword must die by it as well.

- Saga of Tanya the Evil: The Movie

Offline

#2 2024-08-27 08:06:13

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,880

Re: [SOLVED] Sharing Clipboard Between Weston and Xorg

According to that output your XDG_RUNTIME_DIR and WAYLAND_DISPLAY envs are inversed. XDG_RUNTIME_DIR should point to /run/user/1000 and WAYLAND_DISPLAY to /run/user/1000/wayland-1

Are you setting these manually? If so why and where?

Offline

#3 2024-08-31 00:56:31

ReYuki
Member
Registered: 2024-07-30
Posts: 37
Website

Re: [SOLVED] Sharing Clipboard Between Weston and Xorg

Sorry for the late response, I didn't aware someone reply on this post.

V1del wrote:

According to that output your XDG_RUNTIME_DIR and WAYLAND_DISPLAY envs are inversed. XDG_RUNTIME_DIR should point to /run/user/1000 and WAYLAND_DISPLAY to /run/user/1000/wayland-1

Are you setting these manually? If so why and where?

I didn't remember at the time why I invert it, and yeah, I just need to set:

$ WAYLAND_DISPLAY=wayland-1  wl-copy "hellow world"

and it now works


Some felt terror! some felt hatred! some trusted it! some were obsessed with it! The feelings in the hearts of all mankind were what drove them to follow the path of destruction! Just as all who live by the sword must die by it as well.

- Saga of Tanya the Evil: The Movie

Offline

#4 2024-08-31 01:02:31

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,880

Re: [SOLVED] Sharing Clipboard Between Weston and Xorg

You should generally not need to set either of these by hand yourself.

Offline

Board footer

Powered by FluxBB