How windows handle the clipboard interface with Xming?

5.9k views Asked by At

My question comes from a problem:

I Use Xming on Windows 7 to connect to a Linux host (through PuTTY) in order to start and display a gnome-terminal. I have some troubles using the Windows clipboard:

  • Copy from Windows to Xming works well. (Ctrl-C then middle-click on Xming)
  • Copy from Xming to another Xming cession works with delay. (Selection on Xming then middle-click on the other Xming)
  • Copy from Xming to Windows works most of the time with delay. (Selection on Xming then Ctrl-V on Windows)

On Windows: I have to repeat the Ctrl+V many times before it passed my text. (<10 kBytes)

Note that firsts failing attempts don't past the previous clipboard content.

Note 2: If I use a VB script to paste the clipboard content I have no delay.

Set objHTML = CreateObject("htmlfile")
ClipboardText = objHTML.ParentWindow.ClipboardData.GetData("text")
path = "D:\Users\blanchj1\AppData\Local\Temp\clipboard"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(path, 2, true)
objFile.WriteLine ClipboardText
objFile.Close 

Note 3: If I paste through an application menu ex notepad++ -> edit -> paste, I still have this delay.

Note 4: If I paste the content with Ctrl+V a second time, I still have this delay.

Note 5: The delay seems proportional to the number of charters to paste.

So I suppose this delay comes from a windows issue. Is that a problem of characters-encoding conversion?

Who can explain to me how it works?

1

There are 1 answers

0
David A. Gray On

Your observation that the delay is proportional to the number of characters pasted should be expected, since each of those characters must be fed through the SSH terminal, a serial pipeline. Additionally, rendering those characters on your end takes some effort from Windows. I suspect that the reason that you see less delay with your VBScript paste operation is that the VBScript paste operation largely eliminates the user interface from the process, since the clipboard can deal with the characters, without having to figure out how to draw them.