Cygwin clipboard flaky on Windows 7

Nellis, Kenneth Kenneth.Nellis@xerox.com
Fri Oct 17 14:07:00 GMT 2014


From: Chris Stenton
> 
> After 4 years I've just upgrade to version :-
> 
> CYGWIN_NT-6.1 mars 1.7.32(0.274/5/3) 2014-08-13 23:03 i686 Cygwin
> 
> I use the following batch file :-
> 
> run XWin :1 -clipboard -nodecoration -notrayicon -dpi 100  -query machine
> -from xxx.xxx.xxx.xxx -once
> 
> on my windows 7 machine.
> 
> When X is first started and with one "windows notepad" open I can bi-
> directionally  cut and paste between the MS and X windows world.
> However, it seems  that if I have multiple MS windows open then I can't
> cut from MS windows and paste into the X world. It still works for X world
> to MS World.
> 
> Sadly I wrote over my old version which did not have this issue. Is there
> any fix for this?
> 
> Thanks
> 
> Chris

This is interesting because just yesterday I was extensively copying
and pasting from a pair of Notepad windows into my Mintty/bash session
using getclip, and occasionally it would just paste in a single garbage
character. So, this is different from the OP in that X is not involved.

After seeing this post, I tried for nearly a half hour trying to
discern a repeatable pattern to exhibit this behavior, but failed.
Don't want to inject red herrings here, but I've only noticed this
with two Notepad windows open and copying alternately from either.
Also, it seems that selecting new notepad text, but neglecting to 
Ctrl+C may be somehow involved. Again, I've tried many combinations of 
this and have not been able to discern any pattern of when failure
occurs.

This one non-repeatable failure may be illustrative. Consider two
Notepad windows open, A and B, and a mintty/bash shell window open.
The following steps produced failure:

Select text from A, Ctrl-C, getclip (worked), select text from B,
Ctrl-C, getclip (worked), click somewhere in A to deselect text,
click somewhere in B to deselect text, getclip (failed!).

FWIW:

$ uname -srvmo
CYGWIN_NT-6.1 1.7.32(0.274/5/3) 2014-08-13 23:06 x86_64 Cygwin
$ /usr/lib/csih/winProductName
Microsoft Windows 7 Enterprise Edition, 64-bit Service Pack 1 (build 7601)
$ getclip --version
getclip is part of cygutils version 1.4.14
  Copy the Windows Clipboard to stdout

$ cygcheck -c cygutils
Cygwin Package Information
Package              Version        Status
cygutils             1.4.14-1       OK
$ cygcheck -c cygwin
Cygwin Package Information
Package              Version        Status
cygwin               1.7.32-1       OK
$

--Ken Nellis


More information about the Cygwin mailing list