How do I prevent VNC from automatically coping selected text?

5

3

Whenever I select any text the text is immediately copied to the clipboard without me explicitly issuing copy text command. How do I fix this bug or feature?

I am using RealVNC client. The server is running IceWM.

AppleGrew

Posted 2013-05-03T13:28:42.857

Reputation: 133

And you're also using the RealVNC server (just called "VNC Server") right? I am seeing the same issue, it's very annoying. I am using the official free RealVNC client and server. Also, since this is a very old question -- did you ever figure out a fix? – Ricket – 2013-09-25T14:42:15.957

@Ricket No I was not using RealVNC server. When I use that then mostly it works, not always. RealVNC Server+Client, sometimes the copy and paste stops working absolutely. Then I go back to old non-RealVNC Server and it works. – AppleGrew – 2013-09-25T17:32:21.483

I am also having the same issue, very annoying and slows down my work! Just in case if you find a fix, please post it here! – rgamber – 2013-10-23T01:17:49.207

Answers

2

  1. Open ~/.vnc/xstartup
  2. Change the vncconfig line to include SendPrimary=0 (e.g. vncconfig SendPrimary=0 –nowin &)
  3. Restart your VNC sessions

How it works:

  • vncconfig is a program that manages shared functionality between the x11 server and your VNC session, most notably shared clipboard functionality. Without this running in the background, you cannot share a clipboard.
  • X11 maintains a concept of a “primary” buffer (for selected text) and a “clipboard” buffer
  • SendPrimary defaults to 1 (on) which instructs vncconfig to send the primary (selection) buffer to the clipboard buffer, in effect overwriting anything there

Alex

Posted 2013-05-03T13:28:42.857

Reputation: 21

This options seems to have disappeared in latest version. Is there a workaround? – Jeremy Pare – 2018-03-24T23:09:39.643