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-
fere.

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
of
>>> ``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...
succeeded
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
(/home/VHAISBTIMARB/.ssh/id_rsa)

VHAISBTIMARB@isb-timaresbrian-lt ~
$ ps
      PID    PPID    PGID     WINPID  TTY  UID    STIME COMMAND
     4676       1    4676       4676    0 180490 09:16:53 /usr/bin/bash
     4824       1    4824       4824    ? 180490 09:16:54
/usr/bin/ssh-agent
     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
difference.
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
implementation, 
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
7a8
> xterm Xt error: Can't open display: 127.0.0.1:0.0
...

Long version at the bottom.

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

page
http://x.cygwin.com/docs/faq/cygwin-x-faq.html#q-cannot-open-display 
apparently needs the text changed (added?) to: 
"Can't open display: 127.0.0.1:0.0".

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
shows:
VHAISBTIMARB@isb-timaresbrian-lt ~
$ ps
      PID    PPID    PGID     WINPID  TTY  UID    STIME COMMAND
     3076       1    3076       3076    0 180490 14:01:32 /usr/bin/bash
      600       1     600        600    ? 180490 14:01:47
/usr/bin/ssh-agent
I    1724    3076    3076       3336    0 180490 14:01:47
/usr/bin/ssh-add
     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
key's
password.

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: 1.7.1.0 (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: 127.0.0.1:0.0
_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
information
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
pixel
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 =
"none"
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
lay.
winMultiWindowXMsgProc - XOpenDisplay () returned and successfully
opened the di
splay.
DetectUnicodeSupport - Windows NT/2000/XP
winGetDisplay: DISPLAY=:0.0
winClipboardProc - DISPLAY=:0.0
winClipboardProc - XOpenDisplay () returned and successfully opened the
display.

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
and
here are the messages:

VHAISBTIMARB@isb-timaresbrian-lt ~
$ startxwin.sh
Welcome to the XWin X Server
Vendor: The Cygwin/X Project
Release: 1.7.1.0 (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
127.0.0.1:0.0

--
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