This is the mail archive of the cygwin-xfree mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Solution to: -clipboard does not work when using XDMCP connection.


This e-mail is for documentation purposes, no further help is needed.


With the default Cygwin/X install, the XWin.exe -clipboard option does not seem to work when connecting using the XDMCP protocol to a Linux server running GDM.


The unix and Windows clipboards would not synchronized and copy/paste did not work across sessions.

In /var/log/XWin.0.log, these messages were displayed:

-------------------------
winInitClipboard ()
winProcQueryTree - winInitClipboard returned.
winClipboardProc - Hello
DetectUnicodeSupport - Windows NT/2000/XP
winClipboardProc - DISPLAY=127.0.0.1:0.0
AUDIT: Fri Mar 6 13:23:07 2009: 4144 XWin: client 4 rejected from IP 127.0.0.1
winProcEstablishConnection - ProcEstablishConnection failed, bailing.
winClipboardProc - Could not open display, try: 1, sleeping: 4
AUDIT: Fri Mar 6 13:23:11 2009: 4144 XWin: client 4 rejected from IP 127.0.0.1
winClipboardProc - Could not open display, try: 2, sleeping: 4
AUDIT: Fri Mar 6 13:23:15 2009: 4144 XWin: client 4 rejected from IP 127.0.0.1
winClipboardProc - Could not open display, try: 3, sleeping: 4
-------------------------


My launch batch file for XWin.exe is fairly simple:

   @echo off
   start "Title"  C:\cygwin\bin\XWin.exe -clipboard -query 192.168.0.1


I tried a number of solutions offered by others, but this one solved the problem.


Create a text file in your Cygwin installation folder called:

/etc/X0.hosts (that's X-zero dot hosts)

It should contain one line:

localhost

Effectively, this permissions file allows the X server to access your Windows machine's local IP address (127.0.0.1).

This file should probably be part of the standard Cygwin/X install. It also doesn't seem to be mentioned in the Cygwin/X documentation (maybe its there and I just missed it).


Now the log file reports:
-------------------------
winClipboardProc - Hello
DetectUnicodeSupport - Windows NT/2000/XP
winClipboardProc - DISPLAY=127.0.0.1:0.0
winProcEstablishConnection - Clipboard client already launched, returning.
winClipboardProc - XOpenDisplay () returned and successfully opened the display.
-------------------------


and the clipboard now works properly. Copy and Paste between windows and X works as expected.


For GDM users, you may also need to set an entry in your gdm config file located at:


/etc/gdm/gdm.conf

In the [daemon] section:

   [daemon]
   KillInitClients=false

I haven't confirm the GDM requirement but this is how it's set up in my configuration.

Hope this helps someone.
Chris.


-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://x.cygwin.com/docs/ FAQ: http://x.cygwin.com/docs/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]