The Goods

    In the latest stable CygwinX XWin.exe (xorg-x11-xwin-6.8.2.0-4) the "-nolisten tcp"
    option breaks "-multiwindow" and "-clipboard" because those threads use hardcoded
    DISPLAY=127.0.0.1:0.0 instead of the more appropriate DISPLAY=:0.0

    Today, I wanted to use X11 only through an SSH tunnel and needed to make "-nolisten
    tcp" work properly. I was not set up to rebuild XWin.exe from source, so I replaced
    four instances of the string "127.0.0.1" in the binary with displaynumber and
    screennumber syntax followed by null characters to maintain byte offsets. Viola!

    Download xorg-x11-xwin-6.8.2.0-4-naveed.tar.bz2 modified 2006-05-17, download size
    2767577 bytes, contains 2 files

    d1f7e1e4a7ad93aee15a7950b1b7ab9bb90a2f1b (sha1sum for XWin.exe-6.8.2.0-4-orig)
    69bbdc2431f01ba460040c978ab035c576bfc445 (sha1sum for XWin.exe-6.8.2.0-4-naveed)

    Compare XWin.exe-6.8.2.0-4-orig to XWin.exe in /usr/X11R6/bin in your Cygwin
    installation. They should be identical. Stop XWin.exe if it's currently running.
    Replace your XWin.exe with my modified XWin.exe-6.8.2.0-4-naveed and restart X.

    My DISPLAY environment variable is set to :0.0 and this is the line in startxwin.bat
    that eventually gets executed when I start my X server
    %RUN% XWin :0 -audit 0 -nolisten tcp -multiwindow -clipboard -silent-dup-error

    Contact me, Naveed Hasan, if you like.


References

    Problem with -multiwindow and -clipboard when using -nolisten tcp
    XWin multiwindow clipboard
    CygwinXTroubleShooting#Networking
    MIT License for the X Window System (erroneously identified GPL as license earlier)
    xorg-x11-xwin-6.8.2.0-4.tar.bz2 original binary mirrors
    xorg-x11-xwin-6.8.2.0-4-src.tar.bz2 original source mirrors


Relevant source lines

    xorg-x11-xwin-6.8.2.0-4-src/xc/programs/Xserver/hw/xwin/winclipboardthread.c
    167
               "127.0.0.1:%s.0",

    xorg-x11-xwin-6.8.2.0-4-src/xc/programs/Xserver/hw/xwin/winmultiwindowwm.c
    864
         512, "127.0.0.1:%s.%d", display, (int)pProcArg->dwScreen);

    xorg-x11-xwin-6.8.2.0-4-src/xc/programs/Xserver/hw/xwin/winmultiwindowwm.c
    1142
                "127.0.0.1:%s.%d",

    xorg-x11-xwin-6.8.2.0-4-src/xc/programs/Xserver/hw/xwin/winprefs.c
    747
      snprintf (szDisplay, 512, "DISPLAY=127.0.0.1:%s.0", display);

    xorg-x11-xwin-6.8.2.0-4-src/xc/programs/Xserver/hw/xwin/winprefs.c
    756
      snprintf (szDisplay, 512, "127.0.0.1:%s.0", display);