Duplication error upon startx with XWin :0; No terminal with XWin :1

2005-07-07 Thread Angus Veitch
First of all, thanks to Alexander and Igor for responding to my last 
message.  I'm edging my way forward, but haven't seen the light just 
yet.  I'm still not having much success running startx or xdmcp.  It's 
even possible that some of what I am observing is perfectly healthy, and 
it is my expectations or understanding of the program that are wrong.  
Since I don't know whether all my problems are related, I'll deal with 
startxwin.bat in this email and with startxdmcp.bat in the next one.  
Sorry for all the logs!


I'm running a freshly downloaded cygwin/x, and am trying to connect 
WinXP to a (nearly) freshly installed Linux box running MEPIS.


If I run startxwin.bat with the line XWin :0 -multiwindow -clipboard 
-silent-dup-error, I successfully load a terminal, but attempting to 
run startx invokes: Fatal server error: InitOutput - Duplicate 
invocation on display number: 0.  The full XWin.log follows:


-
Welcome to the XWin X Server
Vendor: The Cygwin/X Project
Release: 6.8.2.0-3

Contact: cygwin-xfree@cygwin.com

XWin was started with the following command line:

/usr/X11R6/bin/XWin :0 -multiwindow -clipboard -silent-dup-error

ddxProcessArgument - Initializing default screens
winInitializeDefaultScreens - w 1600 h 1200
winInitializeDefaultScreens - Returning
_XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root
(II) XF86Config is not supported
(II) See http://x.cygwin.com/docs/faq/cygwin-x-faq.html for more information
(==) FontPath set to 
/usr/X11R6/lib/X11/fonts/misc/,/usr/X11R6/lib/X11/fonts/TTF/,/usr/X11R6/lib/X11/fonts/Type1/,/usr/X11R6/lib/X11/fonts/CID/,/usr/X11R6/lib/X11/fonts/75dpi/,/usr/X11R6/lib/X11/fonts/100dpi/
winAdjustVideoModeShadowGDI - Using Windows display depth of 32 bits per 
pixel
winAllocateFBShadowGDI - Creating DIB with width: 1600 height: 1200 
depth: 32
winInitVisualsShadowGDI - Masks 00ff ff00 00ff 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
winInitMultiWindowWM - Calling pthread_mutex_lock ()
winMultiWindowXMsgProc - Hello
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 shared memory support in the kernel

(--) Setting autorepeat to delay=500, rate=31
(--) winConfigKeyboard - Layout: 0409 (0409)
(--) Using preset keyboard for English (USA) (409), type 4
(--) 5 mouse buttons found
Could not init font path element /usr/X11R6/lib/X11/fonts/CID/, removing 
from list!

winInitMultiWindowWM - pthread_mutex_lock () returned.
winProcEstablishConnection - Hello
winInitClipboard ()
winClipboardProc - Hello
DetectUnicodeSupport - Windows NT/2000/XP
winProcEstablishConnection - winInitClipboard returned.
winClipboardProc - DISPLAY=127.0.0.1:0.0
winMultiWindowXMsgProc - pthread_mutex_lock () returned.
winInitMultiWindowWM - pthread_mutex_unlock () returned.
winInitMultiWindowWM - DISPLAY=127.0.0.1:0.0
winMultiWindowXMsgProc - pthread_mutex_unlock () returned.
winMultiWindowXMsgProc - DISPLAY=127.0.0.1:0.0
winInitMultiWindowWM - XOpenDisplay () returned and successfully opened 
the display.
winClipboardProc - XOpenDisplay () returned and successfully opened the 
display.

winProcSetSelectionOwner - Clipboard not yet started, aborting.
winProcSetSelectionOwner - Clipboard not yet started, aborting.
winMultiWindowXMsgProc - XOpenDisplay () returned and successfully 
opened the display.

-

. . . and when I execute startx from the terminal . . .

-
Welcome to the XWin X Server
Vendor: The Cygwin/X Project
Release: 6.8.2.0-3

Contact: cygwin-xfree@cygwin.com

XWin was started with the following command line:

X :0 -multiwindow -clipboard

ddxProcessArgument - Initializing default screens
winInitializeDefaultScreens - w 1600 h 1200
winInitializeDefaultScreens - Returning
_XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root
winCheckDisplayNumber - Cygwin/X is already running on display 0

Fatal server error:
InitOutput - Duplicate invocation on display number: 0.  Exiting.

winDeinitMultiWindowWM - Noting shutdown in progress
-

I can't find any other xwin processes running (perhaps I don't know what 
to look for), but to keep xwin happy, I instead run startxwin.bat with 
XWin :1 (...etc).  The result is that I get no terminal at all  -- the 
cygwin/x window is just a blank grey screen.  The XWin.log follows:


-
Welcome to the XWin X Server
Vendor: The Cygwin/X Project
Release: 6.8.2.0-3

Contact: 

Re: Duplication error upon startx with XWin :0; No terminal with XWin :1

2005-07-07 Thread Alexander Gottwald
On Fri, 8 Jul 2005, Angus Veitch wrote:

 If I run startxwin.bat with the line XWin :0 -multiwindow -clipboard 
 -silent-dup-error, I successfully load a terminal, but attempting to 
 run startx invokes: Fatal server error: InitOutput - Duplicate 
 invocation on display number: 0.  The full XWin.log follows:

Maybe because you've already started the xserver with startxwin.bat?

startxwin.bat and startxwin.sh and startx all do the same.

 
 . . . and when I execute startx from the terminal . . .

Why do you want this. With startxwin.bat, the xserver is already started


 So, my question is: Why is the terminal missing when I run startwinx.bat 
 with display number :1 rather than :0?

because at the start of startxwin.bat there is line 
SET DISPLAY=127.0.0.1:0.0
 ^^ 
which must match the display number used with XWin

bye
ago
-- 
 [EMAIL PROTECTED] 
 http://www.gotti.org   ICQ: 126018723


Re: Duplication error upon startx with XWin :0; No terminal with XWin :1

2005-07-07 Thread Igor Pechtchanski

On Fri, 8 Jul 2005, Angus Veitch wrote:


First of all, thanks to Alexander and Igor for responding to my last
message. I'm edging my way forward, but haven't seen the light just yet.
I'm still not having much success running startx or xdmcp.  It's even
possible that some of what I am observing is perfectly healthy, and it
is my expectations or understanding of the program that are wrong.
Since I don't know whether all my problems are related, I'll deal with
startxwin.bat in this email and with startxdmcp.bat in the next one.
Sorry for all the logs!

I'm running a freshly downloaded cygwin/x, and am trying to connect WinXP to a
(nearly) freshly installed Linux box running MEPIS.

If I run startxwin.bat with the line XWin :0 -multiwindow -clipboard
-silent-dup-error, I successfully load a terminal, but attempting to run
startx invokes: Fatal server error: InitOutput - Duplicate invocation on
display number: 0.  The full XWin.log follows:
[snip]


If it really is a duplicate invocation on the same window station, you
should have an X icon in your system tray.  You could quit the current X
server, and your new one would come up.


I can't find any other xwin processes running (perhaps I don't know what to
look for),


ps -W | grep -i xwin


but to keep xwin happy, I instead run startxwin.bat with XWin :1
(...etc).  The result is that I get no terminal at all  -- the cygwin/x
window is just a blank grey screen.  The XWin.log follows:

-
Welcome to the XWin X Server
Vendor: The Cygwin/X Project
Release: 6.8.2.0-3

Contact: cygwin-xfree@cygwin.com

XWin was started with the following command line:

/usr/X11R6/bin/XWin :1 -multiwindow -clipboard -silent-dup-error
[snip]
winDeinitMultiWindowWM - Noting shutdown in progress
winClipboardProc - winClipboardFlushWindowsMessageQueue trapped WM_QUIT
message, exiting main loop.
winClipboardProc - XDestroyWindow succeeded.

winClipboardIOErrorHandler!

winDeinitMultiWindowWM - Noting shutdown in progress
-

So, my question is: Why is the terminal missing when I run startwinx.bat
with display number :1 rather than :0?


You're basically attempting to start two multiwindow window managers on
the same underlying Windows desktop.  If I understand this correctly, the
multiwindow manager needs some sort of exclusive access to the underlying
Windows interface to delegate all of the window handling, and having more
than one of them makes them interfere with each other.

Try starting the second XWin without the -multiwindow parameter, and see
if it helps.  You don't want -multiwindow for XDMCP anyway.
Igor
--
http://cs.nyu.edu/~pechtcha/
 |\  _,,,---,,_ [EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
|,4-  ) )-,_. ,\ (  `'-'Igor Pechtchanski, Ph.D.
   '---''(_/--'  `-'\_) fL  a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse... -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT


Re: Duplication error upon startx with XWin :0; No terminal with XWin :1

2005-07-07 Thread Alexander Gottwald
On Thu, 7 Jul 2005, Igor Pechtchanski wrote:

 You're basically attempting to start two multiwindow window managers on
 the same underlying Windows desktop.  If I understand this correctly, the
 multiwindow manager needs some sort of exclusive access to the underlying
 Windows interface to delegate all of the window handling, and having more
 than one of them makes them interfere with each other.
 
 Try starting the second XWin without the -multiwindow parameter, and see
 if it helps.  You don't want -multiwindow for XDMCP anyway.

No. It's not the window manager. It's the network layer of X11. The display
number refers to the TCP port (6000+$n) and the unix socket 
/tmp/.X11-unix/X$n. 
If you try to start more than one xserver with the same display it will fail
to bind to the TCP port but create the unix socket anyway. This leads to 
strange results, so we added the check with the mutex.

So the rule is: Different display numbers per XWin or xserver process.

bye
ago
-- 
 [EMAIL PROTECTED] 
 http://www.gotti.org   ICQ: 126018723