From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3292 invoked by alias); 29 Feb 2004 04:45:13 -0000 Mailing-List: contact cygwin-xfree-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-xfree-owner@cygwin.com Mail-Followup-To: cygwin-xfree@cygwin.com Reply-To: cygwin-xfree@cygwin.com Received: (qmail 3285 invoked from network); 29 Feb 2004 04:45:11 -0000 Received: from unknown (HELO lucian.tromer.org) (192.117.108.16) by sources.redhat.com with SMTP; 29 Feb 2004 04:45:11 -0000 Received: from tromer.org (phor [192.168.0.1]) by lucian.tromer.org (8.12.10/8.12.10) with ESMTP id i1T4jApO014477 for ; Sun, 29 Feb 2004 06:45:10 +0200 Message-ID: <40416EC6.7020902@tromer.org> Date: Sun, 29 Feb 2004 14:13:00 -0000 From: Eran Tromer User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040113 MIME-Version: 1.0 To: cygwin-xfree@cygwin.com Subject: Re: reset/terminate problems; preventing multiple XWin instances X-Enigmail-Version: 0.82.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-02/txt/msg00314.txt.bz2 List-Id: 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