Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wl-copy hangs reading stdin if it is not run from a pseudoterminal #228

Open
dkg opened this issue Jul 4, 2024 · 2 comments
Open

wl-copy hangs reading stdin if it is not run from a pseudoterminal #228

dkg opened this issue Jul 4, 2024 · 2 comments

Comments

@dkg
Copy link

dkg commented Jul 4, 2024

I'm using wl-clipboard 2.2.1-1 on debian.

I have a machine running a wayland session (with sway as a compositor) on wayland-1. If i ssh into that machine and do env WL_DISPLAY=wayland-1 wl-copy then i can type on stdin, and hit ctrl-D to end the input, and it gets placed in the wayland clipboard.

Alternately, from the ssh session, i can do:

echo test | env WAYLAND_DISPLAY=wayland-1 wl-copy

and it puts the string test in the wayland clipboard and terminates. Success so far!

however, if i do this all in one go from outside the machine, it hangs:

echo test | ssh $MACHINE env WAYLAND_DISPLAY=wayland-1 wl-copy

i've tried using strace to understand what's happening, but it looks like there are subprocesses i don't understand (cat and file)

@dkg
Copy link
Author

dkg commented Jul 4, 2024

does this have something to do with wl-copy forking into the background?

@jidanni
Copy link

jidanni commented Jul 15, 2024

Maybe we could make a shell script wrapper so that I can even call my-wl-copy on a region in emacs and it won't hang.

P.S., I checked but don't unhttps://www.emacswiki.org/emacs/CopyAndPaste#h5o-4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants