public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
From: Eran Tromer <eran@tromer.org>
To: cygwin-xfree@cygwin.com
Subject: Re: reset/terminate problems; preventing multiple XWin instances
Date: Sun, 29 Feb 2004 14:13:00 -0000	[thread overview]
Message-ID: <40416EC6.7020902@tromer.org> (raw)

On 2004-02-28 21:07, Harold L Hunt II wrote:

> > In multiwindow mode, XWin doesn't reset when the last client exists.
> 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.

ACK. I think this should be noted in the documentation -- I didn't
expect the "magical" window manager to count as a client.

As for preventing multiple instances of XWin, a kludgy way to do it is
by checking if anyone is listening on the X server port, using NETSTAT.
Example:

------------------------------
@echo off
rem Opens an xterm. Runs XWin first if needed.

set CYGWIN_ROOT=c:\cygwin
set DISPLAY_NUM=1

netstat -p tcp -a -n | %CYGWIN_ROOT%\bin\grep -E -q
    "^ +TCP +0\.0\.0\.0:600%DISPLAY_NUM% .* LISTENING"
set PATH=%CYGWIN_ROOT%\bin;%CYGWIN_ROOT%\usr\X11R6\bin
set HOME=
set DISPLAY=:%DISPLAY_NUM%
if not errorlevel 1 goto GOTX
start XWin %DISPLAY% -multiwindow -clipboard -dpi 96 -nowinkill
:GOTX
run xterm -ls -dpi 96
------------------------------

(Remove the linebreak from the the 'netstat' line above.)


BTW, -nounixkill seems to to be broken (Ctrl-Alt-Backspace still
terminates XWin).


   Eran


         reply	other threads:[~2004-02-29  4:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-29  6:41 cygwinx2eran
2004-02-29 13:49 ` Harold L Hunt II
2004-02-29 14:13   ` Eran Tromer [this message]
2004-02-29 14:23     ` Takuma Murakami
2004-02-29 18:21       ` Harold L Hunt II
2004-03-03 21:54       ` cygwinx2eran
2004-03-04  9:02         ` Takuma Murakami
2004-03-04 15:11         ` Ehud Karni
2004-02-29 14:23     ` Harold L Hunt II
2004-03-04 10:37 gkorte

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40416EC6.7020902@tromer.org \
    --to=eran@tromer.org \
    --cc=cygwin-xfree@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).