reset/terminate problems; preventing multiple XWin instances
Harold L Hunt II
Sun Feb 29 13:49:00 GMT 2004
> A few issues I've encountered with Cygwin/X 4.3.0-47:
> Issue #1:
> In multiwindow mode, XWin doesn't reset when the last client exists.
> XWin :9 -terminate -multiwindow & sleep 5; DISPLAY=:9 xhost
> XWin should terminate after 5 seconds, but it remains running.
It isn't supposed to. Run 'twm' as your window manager and you will see
that the X Server does not reset when the last non-window manager client
exits; this is because the window manager itself is a client.
Also, the whole "reset" functionality is pretty much pointless for X
Server that run on top of other windowing systems, which is the case for
Cygwin/X. The only time it makes sense to perform "resets" for Cygwin/X
is when disconnecting from an Xdmcp session. I have been thinking about
removing or disabling the reset functionality in most non-Xdmcp cases
> Issue #2:
> In the default mode, XWin sometimes terminates instead of resetting.
> XWin :9& sleep 5; DISPLAY=:9 xhost; sleep 5; DISPLAY=:9 xhost
> XWin should reset after 5 seconds and again after 5 more seconds.
> The first reset goes well, but on the second reset XWin usually terminates.
You get two resets tops, then it crashes. That is due to some generic
bugs in the Xserver/dix/ and Xserver/os/ code that has been fixed in
more recent source code trees. We are working on cutting a release from
a newer tree, but it hasn't happened yet.
> Issue #3:
> Hoe does one write a batchfile that does "open an xterm window; run XWin
> first if necessary"? Being perhaps the most common usage case, such a
> batchfile should be bundled in the Cygwin/X package and mentioned in the
While a nice idea, you cannot currently. It isn't that this has not
been thought of previously, it is just that no one has the time to do
such a thing.
> Note that /usr/X11R6/bin/startxwin.bat always runs a new instance of
> XWin, even if one is already running. This can result in inefficiency
> and confusion when the script is executed several times to open several
> xterm windows (a natural thing to do). It's made even worse by issue #1
> Also, startxwin.bat doesn't use -clipboard.
It is not a trivial thing to fix, and no one has asked for it
previously. However, you may be in luck because this is one of the
things that is needed for a side project I am working on. I think
Takuma might have also been thinking about implementing this feature.
More information about the Cygwin-xfree