xterm doesn't open on start (was: checkX problems)

Timares, Brian (Patriot) Brian.Timares@va.gov
Mon Nov 30 20:52:00 GMT 2009

Just to be clear from the start, Cygwin 1.7 not 1.5.  And I tried to
make this clear.  And I tried to not let Outlook's word-wrap inter-

Lothar Brendel wrote:
>Timares, Brian (Patriot) wrote:
>> Lothar Brendel wrote:
>>> Timares, Brian (Patriot) wrote:
>>>> Lothar Brendel wrote:
>>>>> My guess: It's the old checkX-problem again because you're using
>>>>> version
>>>>> 0.3.0-1 of the run2-package. Do to some reason unknown to me,
>>>>> that's the default version. But we need 0.3.1-1, which you only
>>>>> get when 
>>>> Tried it, including changing XWin Server to
>>>> C:\cygwin\bin\run2.exe /usr/bin/startxwin.bat
>>> That was a misunderstanding. I didn't mean to use ``run2'' instead
>>> ``run'' but to verify that the version of the *package* 'run2'
>>> (containing ``checkX'') is the most recent one. Did you do that?
>> You were clear.  I did get the 0.3.1-1 and it showed up just as you
>> said.
>IC, but could you please perform the following two tests nevertheless?
>First open Cygwin's standard bash console, then enter:

Ran Cygwin Bash Shell, which has a Target of "C:\cygwin\Cygwin.bat  ":

Initialising new SSH agent...
Enter passphrase for /home/VHAISBTIMARB/.ssh/id_rsa:
Bad passphrase, try again for /home/VHAISBTIMARB/.ssh/id_rsa:
Identity added: /home/VHAISBTIMARB/.ssh/id_rsa

VHAISBTIMARB@isb-timaresbrian-lt ~
$ ps
     4676       1    4676       4676    0 180490 09:16:53 /usr/bin/bash
     4824       1    4824       4824    ? 180490 09:16:54
     5548    4676    5548       1608    0 180490 09:17:30 /usr/bin/ps

>i) ```time checkX -t 12''
>How long does it take?

VHAISBTIMARB@isb-timaresbrian-lt ~
$ time checkX -t 12

real    0m0.098s
user    0m0.046s
sys     0m0.031s

>ii) ``startxwin.sh''
>Any messages?

Yes, see below, but after reviewing it all I tried it with various items
on and
off and having the One-VA VPN client (Cisco VPN Client 5) off makes the
It is odd, though, that if I run startxwin.sh again, it works the second
time, even
though the VPN is on.  Also, if I quit X Windows (making sure the
ssh-agent process
is gone) and relaunch everything works fine.  It is just the first time
that I have
trouble if the VPN is on.

I believe the VPN hadn't caused me problems with Cygwin's X Windows
but I can't say that with 100% certainty.  Anyway, here is the key
difference to
no VPN versus VPN on:

diff working.txt broken.txt
> xterm Xt error: Can't open display:

Long version at the bottom.

I note that "9.11. Cannot Open Display:" on the referenced

apparently needs the text changed (added?) to: 
"Can't open display:".

1) Why does launching it again work?  Because it doesn't need me to
enter my key's password?
2) Why does quitting/launching after it has worked once work?  Again, is
it because of it not needing my input?
3) If I go my preferred 'XWin Server' to launch it, it doesn't work, not

even the X icon shows up.  If I launch that again, it works.  If I open 
a cygwin bash shell (before the 2nd launch) and check processes it
VHAISBTIMARB@isb-timaresbrian-lt ~
$ ps
     3076       1    3076       3076    0 180490 14:01:32 /usr/bin/bash
      600       1     600        600    ? 180490 14:01:47
I    1724    3076    3076       3336    0 180490 14:01:47
     3304       1    3304       3304    1 180490 14:02:05 /usr/bin/bash
     3188    3304    3188       2568    1 180490 14:02:09 /usr/bin/ps

What I want is to have an alias to XWin Server (currently its Target is
C:\cygwin\bin\run.exe /usr/bin/startxwin.bat) in my startup items so I
always get X Windows, and always am prompted in an xterm for my ssh

What I'll try next:  Update to the current version of cygwin (hopefully 
the new termcap gets rid of the 'clear screen after viewing man page or 
running vi' issue AKA the -X option in less AKA the 
'XTerm*titeInhibit: true' issue) and see if that helps, but it appears 
I just have to be careful to launch the VPN after starting X Windows 
after launching a cygwin bash shell.

------------------ long (complete) version of startxwin.sh with VPN on:
VHAISBTIMARB@isb-timaresbrian-lt ~
$ startxwin.sh
Welcome to the XWin X Server
Vendor: The Cygwin/X Project
Release: (10701000)
Build Date: 2009-11-11

Contact: cygwin-xfree@cygwin.com

XWin was started with the following command line:

XWin -multiwindow -clipboard -silent-dup-error

VHAISBTIMARB@isb-timaresbrian-lt ~
$ xterm Xt error: Can't open display:
_XSERVTransSocketOpenCOTSServer: Unable to open socket for inet6
_XSERVTransOpen: transport open failed for inet6/isb-timaresbrian-lt:0
_XSERVTransMakeAllCOTSServerListeners: failed to open listener for inet6
winValidateArgs - g_iNumScreens: 1 iMaxConsecutiveScreen: 1
(II) xorg.conf is not supported
(II) See http://x.cygwin.com/docs/faq/cygwin-x-faq.html for more
winPrefsLoadPreferences: /etc/X11/system.XWinrc
LoadPreferences: Done parsing the configuration file...
winGetDisplay: DISPLAY=:0.0
winDetectSupportedEngines - Windows NT/2000/XP
winDetectSupportedEngines - DirectDraw installed
winDetectSupportedEngines - DirectDraw4 installed
winDetectSupportedEngines - Returning, supported engines 00000007
winSetEngine - Multi Window or Rootless => ShadowGDI
winAdjustVideoModeShadowGDI - Using Windows display depth of 32 bits per
winAllocateFBShadowGDI - Creating DIB with width: 1920 height: 1968
depth: 32
winFinishScreenInitFB - Masks: 00ff0000 0000ff00 000000ff
winInitVisualsShadowGDI - Masks 00ff0000 0000ff00 000000ff BPRGB 8 d 24
bpp 32
null screen fn ReparentWindow
null screen fn RestackWindow
InitQueue - Calling pthread_mutex_init
InitQueue - pthread_mutex_init returned
InitQueue - Calling pthread_cond_init
InitQueue - pthread_cond_init returned
winInitMultiWindowWM - Hello
Screen 0 added at XINERAMA coordinate (0,768).
winMultiWindowXMsgProc - Hello
winInitMultiWindowWM - Calling pthread_mutex_lock ()
winMultiWindowXMsgProc - Calling pthread_mutex_lock ()
MIT-SHM extension disabled due to lack of kernel support
XFree86-Bigfont extension local-client optimization disabled due to lack
of shar
ed memory support in the kernel
(II) AIGLX: Loaded and initialized /usr/lib/dri/swrast_dri.so
(II) GLX: Initialized DRISWRAST GL provider for screen 0
winPointerWarpCursor - Discarding first warp: 960 984
(--) 8 mouse buttons found
(--) Setting autorepeat to delay=500, rate=31
(--) winConfigKeyboard - Layout: "00000409" (00000409)
(--) Using preset keyboard for "English (USA)" (409), type "4"
Rules = "base" Model = "pc105" Layout = "us" Variant = "none" Options =
winInitMultiWindowWM - pthread_mutex_lock () returned.
winInitMultiWindowWM - pthread_mutex_unlock () returned.
winMultiWindowXMsgProc - pthread_mutex_lock () returned.
winGetDisplay: DISPLAY=:0.0
winMultiWindowXMsgProc - pthread_mutex_unlock () returned.
winInitMultiWindowWM - DISPLAY=:0.0
winGetDisplay: DISPLAY=:0.0
winMultiWindowXMsgProc - DISPLAY=:0.0
winProcEstablishConnection - Hello
winInitClipboard ()
winProcEstablishConnection - winInitClipboard returned.
winClipboardProc - Hello
winInitMultiWindowWM - XOpenDisplay () returned and successfully opened
the disp
winMultiWindowXMsgProc - XOpenDisplay () returned and successfully
opened the di
DetectUnicodeSupport - Windows NT/2000/XP
winGetDisplay: DISPLAY=:0.0
winClipboardProc - DISPLAY=:0.0
winClipboardProc - XOpenDisplay () returned and successfully opened the

No X window showed up, but the X Server icon showed.

I hit the up arrow and ran startxwin.sh again, this time I got an xterm
here are the messages:

VHAISBTIMARB@isb-timaresbrian-lt ~
$ startxwin.sh
Welcome to the XWin X Server
Vendor: The Cygwin/X Project
Release: (10701000)
Build Date: 2009-11-11

Contact: cygwin-xfree@cygwin.com

XWin was started with the following command line:

XWin -multiwindow -clipboard -silent-dup-error

Fatal server error:
Server is already active for display 0
        If this server is no longer running, remove /tmp/.X0-lock
        and start again.

winDeinitMultiWindowWM - Noting shutdown in progress

VHAISBTIMARB@isb-timaresbrian-lt ~

From the xterm:
VHAISBTIMARB@isb-timaresbrian-lt ~
$ echo $DISPLAY

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/

More information about the Cygwin-xfree mailing list