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

Various issues related to clipboard relaying #100

Closed
ehfd opened this issue Oct 1, 2023 · 16 comments
Closed

Various issues related to clipboard relaying #100

ehfd opened this issue Oct 1, 2023 · 16 comments
Assignees
Labels
help wanted External contribution is required interface OS input, display, or audio interfaces web Web components including gst-web

Comments

@ehfd
Copy link
Member

ehfd commented Oct 1, 2023

xclip apparently works on Xorg from the client to the host, but not from the host to the client. Both directions work using Xvfb.

This is reproducible on https://github.com/selkies-project/docker-nvidia-glx-desktop (where Xorg is used) and works correctly both directions on https://github.com/selkies-project/docker-nvidia-egl-desktop.

This might be limited to https://github.com/selkies-project/docker-nvidia-glx-desktop and not on bare metal remote hosts.

Note: Works and does not work for me now randomly with an unknown reason.

@ehfd ehfd added bug Something isn't working web Web components including gst-web interface OS input, display, or audio interfaces labels Oct 1, 2023
@totaam
Copy link

totaam commented Oct 1, 2023

@ehfd Xpra-org/xpra#4007 (reply in thread)
Can't explain it, but a CUDA update fixed the clipboard here. Could be the same thing?

@ehfd
Copy link
Member Author

ehfd commented Oct 2, 2023

Interesting. We'll take a look.

@ehfd
Copy link
Member Author

ehfd commented Oct 3, 2023

Strange. It works now with an unknown condition.
Need to identify what's happening.

@ehfd
Copy link
Member Author

ehfd commented Oct 8, 2023

It does not work in most times and works seldomly. Need to find the cause.

@ehfd
Copy link
Member Author

ehfd commented Oct 12, 2023

Related error message:

[18:27:40] [webrtc] Failed to read clipboard contents: InvalidCharacterError: Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.

[12:6:23] [webrtc] Failed to read clipboard contents: NotAllowedError: Document is not focused.

@ehfd ehfd changed the title Clipboard from the host to client does not work on Xorg but works on Xvfb Various issues related to clipboard passing Oct 12, 2023
@ehfd ehfd changed the title Various issues related to clipboard passing Various issues related to clipboard relaying Oct 12, 2023
@ehfd ehfd added the high-priority Must be addressed as soon as possible, remove when resolved label Oct 19, 2023
@ehfd
Copy link
Member Author

ehfd commented Oct 19, 2023

I'm adding this to the list of urgent issues. @danisla

@ehfd ehfd added the help wanted External contribution is required label Nov 10, 2023
@ehfd
Copy link
Member Author

ehfd commented Dec 7, 2023

I feel that the core issue of this problem is that the clipboard is set multiple times to the same value repeatedly when it should be only set one time, masking the new clipboard value that is supposed to be set, and there is nothing to prevent this phenomenon. It also seems to frequently prioritize the clipboard value of the client instead of bringing the host clipboard value to the client.

Some kind of control is required to not make xclip do that.

@ehfd
Copy link
Member Author

ehfd commented Jan 5, 2024

I think it's a bit better because of some unknown reason, but not too sure.

@ehfd
Copy link
Member Author

ehfd commented Feb 25, 2024

Possibly related to m1k1o/neko#192?

@ehfd ehfd mentioned this issue Mar 24, 2024
26 tasks
@ehfd
Copy link
Member Author

ehfd commented Apr 11, 2024

May be addressed in conjunction to #74.

@ehfd
Copy link
Member Author

ehfd commented Apr 15, 2024

I think that inbound works pretty okay, but there is an evident issue with outbound, where the clipboard data doesn't come to the client in certain situations.

@ehfd
Copy link
Member Author

ehfd commented May 7, 2024

Part of the fix for #84 ?

@ehfd ehfd removed the high-priority Must be addressed as soon as possible, remove when resolved label May 8, 2024
@ehfd
Copy link
Member Author

ehfd commented May 8, 2024

International clipboard also fixed by #149.

@ehfd
Copy link
Member Author

ehfd commented May 8, 2024

Please reopen if issue comes out again.

@ehfd ehfd closed this as completed May 8, 2024
@ehfd ehfd reopened this May 11, 2024
@ehfd
Copy link
Member Author

ehfd commented May 11, 2024

xclip seems to hang in certain situations, and seems to be a common issue when piping is used.

https://stackoverflow.com/questions/44553539/python-script-using-subprocess-and-xclip-hangs-if-piped-in-bash
asweigart/pyperclip#116
https://www.reddit.com/r/linuxquestions/comments/hk72dy/xclip_in_selection_clipboard_1devstdin_hanging/?rdt=33144
https://emacs.stackexchange.com/questions/39019/xclip-hangs-shell-command

xsel is a viable alternative. Meanwhile, interventions are required to fix xclip from working erratically.

@ehfd ehfd removed the bug Something isn't working label May 22, 2024
@ehfd
Copy link
Member Author

ehfd commented May 22, 2024

Remaining issues are fixed by using xsel.

@ehfd ehfd closed this as completed May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted External contribution is required interface OS input, display, or audio interfaces web Web components including gst-web
Projects
None yet
Development

No branches or pull requests

3 participants