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

Clipboard content gets lost if something is selected on the server side #1251

Closed
L-U-T-i opened this issue May 18, 2021 · 5 comments
Closed
Labels
bug Something isn't working

Comments

@L-U-T-i
Copy link

L-U-T-i commented May 18, 2021

Describe the bug
If some text is copied to the clipboard on the client side (to be pasted into a target on the server side), it seems to be removed from the clipboard (paste button is greyed out / not available anymore) if something is just selected (not copied!) on the server side before the paste attempt.
It is extremely annoying as many times it is virtually impossible to copy some text to server without selecting anything there before or between paste operations (so, I have to copy the same content on the client side again and again, if I have to paste it to more than just one single place). I also prefer to simply overwrite something with a clipboard content (copied on the client side in advance) instead of erasing it first on the server side, go to the client, copy something, return back to server and paste (risking to paste on the wrong place - if cursor would move unintentionally move in between).

To Reproduce
Steps to reproduce the behavior:

  1. Copy some text on the client side
  2. In VNC client window (server side), open a text editor or terminal window
  3. Paste the clipboard content - it should work as expected
  4. Select a part of pasted text or anything else (on the server side)
  5. Right click to get the menu with a "paste" entry - it is greyed out now, so no paste anymore...

Expected behavior
If nothing has been copied in between, the clipboard content should remain available, nomatter if something has been selected in between or not. So, the "paste" right click menu entry should still be available.

Screenshots
Request if needed, please.

Client (please complete the following information):

  • OS: Fedora 32 / CentOS 7
  • VNC client: TigerVNC
  • VNC client version: 1.10.1 / custom builds of 1.11.0 and 1.11.80 (git commits up to 89f6d5a) - I guess it doesn't matter
  • Client downloaded from: my Linux distribution / custom builds

Server (please complete the following information):

  • OS: CentOS 8.3
  • VNC server: TigerVNC
  • VNC server version: 1.10.1 / custom builds of 1.11.0 and 1.11.80 (git commits up to 89f6d5a)
  • Server downloaded from: my Linux distribution / custom builds
  • Server was started using: systemd

Additional context
I've made some custom builds with more recent versions of TigerVNC, to test if the issue has been fixed in between (1.11.0 rebuilt using probably well tested CentOS 8.3 Stream SPEC).

The problems with a clipboard started with CentOS upgrade from 8.2 to 8.3 (so before TigerVNC 1.10.1), if I remember well. Before, everything was working without any issues, as expected. I also beleive it is the server side to be blamed, not the client (I haven't do anything on the Fedora 32 / CentOS 7 side, just upgraded CentOS 8.2 to 8.3 when the issue appeared).

@CendioOssman
Copy link
Member

We did an overhaul of the clipboard in 1.10.0, so something might have changed at that point.

However the way it currently works was somewhat how it "should" work. VNC only has a single clipboard, unlike two that X11 commonly has. So it has to glue those two together, which means if one is lost so is the other.

Your use case is very reasonable though, so it would be nice if we can come up with some clever way to handle this.

@CendioOssman CendioOssman added the bug Something isn't working label May 19, 2021
@L-U-T-i
Copy link
Author

L-U-T-i commented May 22, 2021

I'm not sure I understand this about one (VNC) and two (X11) clipboards. I'd say that as long as something is just selected, but not copied or cut to the clipboard yet, there should be no reason the old clipboard content is lost (even with one single clipboard). Or, does this technique function in any other way?
In any case, thank you very much for your feedback and support.

@CendioOssman
Copy link
Member

Under X11 just selecting things puts it in to a (different) clipboard. Many users expect this clipboard to also work over VNC and it's not always clear how to prioritise this over the "normal" clipboard.

@L-U-T-i
Copy link
Author

L-U-T-i commented May 26, 2021

Thank you for an explanation. Are you referring to something like explained here: https://shallowsky.com/blog/linux/x-selection.html?

If yes, I see no other way as to prefer the (shared) clipboard, and not allow the remote "primary selection" to anyhow interfere / wipe out the shared clipboard content (if we have only one selection transfer available in VNC protocol...). "Primary selection" could probably still be used just locally and just remotely (but not shared among both), or?

@CendioOssman
Copy link
Member

This should be fixed now in 95ad4d7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants