-clipboard fails, xwinclip works if delayed

John.Peters@csiro.au John.Peters@csiro.au
Thu Mar 27 23:53:00 GMT 2003

Could someone please point out what I am missing?

Cygwin/XFree works rock-solid for me as an x-terminal to a remote host.

However I cannot get -clipboard to work; Xwinclip works fine, but only if 
I delay running it until I've logged in to the remote host and executed 
"xhost +<my-pc-addr>".  If I start Xwinclip sooner, it says:

  Xlib: connection to "<my-pc-addr>" refused by server
  Could not open display, try: 1, sleeping:4

It gets up to try 3 in about 10 seconds, then quits.  Logging into the
remote host takes up to a minute, after which xhost can be executed.
Starting Xwinclip late enough that not all tries are used up works ok.

Is there some setting I'm missing? Or does -clipboard include a similar 
timeout which could be extended?

I've tried the telnet method described in the user guide, but it seems to 
have the same problem.

xwin.bat script is:
SET DISPLAY=<my-pc-addr>:0.0
SET PATH=.;\cygwin\bin;\cygwin\usr\X11R6\bin;%PATH%
start /B XWin-Test79.exe -query <host-addr> -kb -clipboard -nowinkill
-nodecoration -unixkill -from <my-pc-addr>

setting DISPLAY to doesn't help.

The system is win2000 with a 1 GHz pentium.
Extracting "clip" from the log gives:
% cat XWinrl.log|grep -i clip
winCreatePrimarySurfaceShadowDDNL - Attached clipper to primary surface
winFinishScreenInitFB - Calling winInitClipboard.
winInitClipboard ()
winClipboardProc - Hello
winClipboardProc - Calling pthread_mutex_lock ()
winClipboardProc - pthread_mutex_lock () returned.
winClipboardProc - Calling setlocale ()
winClipboardProc - setlocale () returned
winClipboardProc - pthread_mutex_unlock () returned.
winClipboardProc - XInitThreads failed.

Many thanks
John Peters
CSIRO National Measurement Laboratory
PO Box 218                            Phone:    +61 2 9413 7503
Lindfield NSW 2070                    Fax:      +61 2 9413 7202
Australia                             Email: John.Peters@csiro.au

More information about the Cygwin-xfree mailing list