Due to the lack of security with standard vino server, I switched to use x11vnc on my linux (with Xubuntu 14.04) box and SSVNC on the windows side.
With vino, cut and paste from windows to Linux and windows, in the two directions, was flaky(1) but when it worked, it worked for every program; I could use the vim
register "+
without problem. I run(2)
autocutsel -fork
normally so that the "middle click" and ctrl-c/v selections are the same.
Now that I use x11vnc (called with: x11vnc -forever -repeat -safer -usepw -ssl -autoport 6000
) to have a safe, encrypted connection, a problem arose:
-
I can copy on windows and paste in the remote linux terminals, libreoffice etc. without any problem, in both directions.
-
In
vim
, orgvim
, any attempt to paste with"+p
or"*p
saysE353: Nothing in register *
-
Again in
vim
orgvim
, the other way around does work: if I"+yy
then I can paste the thing on the Windows side.
As anyone any clue about this problem? The strange thing is that paste works everywhere I checked but in vim
…
Package Installed Previous Now State
=======================-===============-===============-===============-=====
vim 2:7.4.052-1ubuntu3 2:7.4.052-1ubuntu3 2:7.4.052-1ubuntu3 install
vim-gnome 2:7.4.052-1ubuntu3 2:7.4.052-1ubuntu3 2:7.4.052-1ubuntu3 install
Footnotes:
(1) can't find the bug now — it is reported. It stops working after a while.
(2) I tried with and without. No changes.
Best Answer
Since I do not know which x11vnc you are using (I have three different versions, there are others) this is a tutorial to troubleshoot this specific problem.
First is to understand the clipboards involved. There are in most cases four of them involved. (More is possible if you use clipboard management tools.) X11 defines three clipboards: Primary, Secondary, and Clipboard. Secondary is seldom used, (and is almost certainly not your problem) so we will ignore it. Applications that use middle click to paste (xterm, et al) normally use the primary clipboard. Applications that do a windows style paste (click edit, click paste or control V) sometimes use just the clipboard clipboard. Some applications do both (Google Chrome pastes from primary with a middle click and from clipboard with a control V). Next is the VNC clipboard (just one) and there is the windows clipboard. (If you are using a vnc viewer running on X11, things get more complicated, but that will make sense after thinking about this.) the VNC clipboard is special in that it keeps track of various updates of the other clipboards to keep them up to date. If you ignore the primary clipboard, this is fairly simple in that the most recently updated clipboard is copied to all the others. The challenge is that the desired behaviour of the primary clipboard is not well defined. I have seen the following behaviours of various vnc implementations:
Next is the tools. There are two tools I consider essential for debugging clipboard issues: a text editor (notepad works fine for this) and xclip. A windows clipboard viewer is nice but not essential.
Now the procedure: From each application in the group you are troubleshooting, select and copy some text checking the status of all three accessible clipboards. (The vnc clipboard is very difficult to view directly and not directly useful as it normally does not store the data, only the metadata.) answer these questions: which clipboard does each application use? what order are they used?
Hopefully this is enough information to get you started.