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
vncserver abandons all selections (CLIPBOARD/PRIMARY) when one selection claimed by other process #1207
Comments
Unfortunately VNC only has a single clipboard, so keeping something in this case gets messy. But you seem to be right that we aren't dropping the other clipboard when we lose ownership. |
Fixed in 18cc324. |
Hey, I suspect that, the fix resolved the sporatious temporary app hang issues, it causes the new one which harms productivity. Problem description:
I need your opinion on this. I'll soon start testing it on my machine, as currently I only suspect this commit for the problem, and not fully sure yet. EDIT 1: Built the server and tested - Now works properly(with test fix). Can't yet reproduce the 'hang' effect, so don't know if its present. |
Thanks. While my workaround worked for us quite well(And our apps didn't hang as well) the proper rework is welcome. |
Describe the bug
Vncserver abandons all selections (CLIPBOARD/PRIMARY) when one of those selections is claimed by another process running on the server. The remaining selection is still owned by vncserver as far as X is concerned, so when any process requests that selection it will hang waiting for a response from vncserver.
For example, if vncserver owns both CLIPBOARD and PRIMARY and another process claims PRIMARY, then when any process requests CLIPBOARD it will not get a response from vncserver with the data.
To Reproduce
Steps to reproduce the behavior:
vncconfig
or use other method to ensure that the primary selection is used to send and receive data (Accept clipboard form viewers
,Also set primary selection
,Send clipboard to viewers
, andSend primary selection to viewers
are all set)xsel -p
andxsel -b
(primary/clipboard selections respectively)echo "server data" > xsel -p
xsel -b
xsel
command hangsNote that it is possible to reproduce the issue when
Send primary selection to viewers
is not set, but the conditions are more limited.Expected behavior
After step 5. above, xsel should return the data that the vnc server last received from the vnc client. Because the two selections are logically distinct, setting one of them should not invalidate the other.
Client (please complete the following information):
Server (please complete the following information):
Additional context
This seems like it is caused by vncserver assuming that the clipboard can only hold one piece of information, and I think things generally work when it is only getting/setting the CLIPBOARD selection and not also using the PRIMARY selection.
The text was updated successfully, but these errors were encountered: