[Lazarus] Clipboard problem with Lazarus using VNC

Bo Berglund bo.berglund at gmail.com
Sat Oct 24 11:25:58 CEST 2015


I am running Lazarus on a Linux system (Raspbian Jessie) but that
system is headless so I use TightVNC to get a desktop on my Win7 PC.
It works pretty well except for the clipboard that is supposed to be
shared between the two systems.
The .vnc/xstartup file in the home directory on Raspbian has been
edited to include the line:
autocutsel -fork
as described in several places on the net for clipboard sharing across
VNC sessions.

What actually happens is this:
1) Copy text on the Windows side
Go to the Lazarus editor in the VNC window and paste (Ctrl-V) - it
works just fine and the text appears in the Lazarus editor.

2) Copy some part of code in Lazarus code editor either by selecting
it and hitting Ctrl-C or by right-clicking the selection and use the
Copy function.
Back in the Windows text editor Ctrl-V now pastes the text I
*previously* copied in Windows and pasted in Lazarus...

3) In VNC open the Raspbian text editor and do a Ctrl-V in that.
The text copied in Lazarus is now written to the edit window.

4) Now move back to Windows text editor and paste with Ctrl-V.
Result:
The text from Lazarus that was pasted into the Raspbian editor is now
also pasted in Windows.

So it seems like the action to paste the text copied in lazarus code
editor into another application inside Linux makes it available on the
Windows side too...

To me this looks like Lazarus is doing something strange when one uses
Copy inside the code editor (and in fact also in the messages window)
so that the pasting is only working inside Linux, but once it has been
pasted in Linux but outside Lazarus it is properly set in the Linux
clipboard and then also available for Windows.
It does not help to paste the text in the Lazarus code editor, it
still won't paste in Windows.

Is this a known issue with the Lazarus handling of the clipboard?
Or is there a configuration item in Lazarus that may modify this?

Using Lazarus 1.5 SVN 50059 with FPC 3.1.1


-- 
Bo Berglund
Developer in Sweden





More information about the Lazarus mailing list