So far so good, except I can’t paste hi with the normal system shortcuts. If
I press ctrl+shift+v in the terminal, no paste happens. If I press ctrl+v
in Librewolf, GNOME text editor, or any graphical app—nothing happens, no
paste.
I’ve also tried wl-copy --primary and wl-copy --foreground, but those made
no difference.
If I highlight text and then right-click in the terminal or any GUI app, then ctrl+v paste works fine.
Not sure but I think under Wayland a lot of this is running via dbus, so maybe some env vars are not matching between your terminal and GUI session.
For example to get to work, taking a screenshot in a script, I ran under Rasbian via cron, I had to get the Wayland env vars WAYLAND_DISPLAY, XDG_RUNTIME_DIR and DBUS_SESSION_BUS_ADDRESS from a process I knew had them.
I happened to install some package and wl-copy seems to work now! And even better I was able to bisect my generation history to find exactly the point where wl-copy starts working!
After installing this package, echo "test7" | wl-copy now puts test7 into my system clipboard and I’m able to paste it in other GUI apps!
I have no idea why this package fixes the issue, but when I switch to generation 25 it stops working, so this package seems to be the fix.
Btw, I was able to verify that WAYLAND_DISPLAY, XDG_RUNTIME_DIR, and DBUS_SESSION_BUS_ADDRESS had the same values in my terminal as /proc/pid/environ for my other apps.