From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3691 invoked by alias); 4 Mar 2004 10:37:52 -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 3652 invoked from network); 4 Mar 2004 10:37:48 -0000 Received: from unknown (HELO inet-tsb.toshiba.co.jp) (202.33.96.40) by sources.redhat.com with SMTP; 4 Mar 2004 10:37:48 -0000 Received: from tsb-wall.toshiba.co.jp ([133.199.160.134]) by inet-tsb.toshiba.co.jp with ESMTP id i24AbkKL003725 for ; Thu, 4 Mar 2004 19:37:46 +0900 (JST) Received: (from root@localhost) by tsb-wall.toshiba.co.jp id i24Abklm010517 for ; Thu, 4 Mar 2004 19:37:46 +0900 (JST) Received: from tis2 [133.199.160.66] by tsb-wall.toshiba.co.jp with SMTP id VAA10514 ; Thu, 4 Mar 2004 19:37:45 +0900 Received: from mx.toshiba.co.jp by tis2.tis.toshiba.co.jp id TAA22487; Thu, 4 Mar 2004 19:37:45 +0900 (JST) From: gkorte@tmse.nl Received: from tmse-n01.tmse.nl by toshiba.co.jp id TAA09362; Thu, 4 Mar 2004 19:37:44 +0900 (JST) To: cygwin-xfree@cygwin.com Subject: Re: reset/terminate problems; preventing multiple XWin instances MIME-Version: 1.0 Message-ID: Date: Thu, 04 Mar 2004 10:37:00 -0000 Content-Type: text/plain; charset="us-ascii" X-SW-Source: 2004-03/txt/msg00103.txt.bz2 List-Id: >I see that it's in 4.3.0-50 and working well, but I don't see how the >current implementation addresses the common task I mentioned: >"open an xterm; run XWin first if needed" >If I use a batchfile that always runs XWin and then xterm, from the 2nd >invocation onwards it will produce the error popup reporting a "Fatal >error" and directing me a to log file... Not quite what's needed here.[1] > >Perhaps there should be a switch that says "if the display already >exists, exit silently". Hi Eran, I had the same problem and have solved it with the following Batch file: ------------- @echo off SET DISPLAY=127.0.0.1:0.0 SET CYGWIN_ROOT=\cygwin SET PATH=.;%CYGWIN_ROOT%\bin;%CYGWIN_ROOT%\usr\X11R6\bin;%PATH% REM Find a running version of XWin c:\progra~1\resour~1\pulist |c:\progra~1\resour~1\qgrep XWin >nul REM if Xwin is running then start an Xterm if errorlevel 1 goto NEXT run C:\cygwin\usr\X11R6\bin\xterm -cr red -sl 1000 -sb -rightbar -ms red -fg white -bg black -e /usr/bin/bash --login goto END :NEXT REM Delete temp and lock file and start XWin and Xterm. attrib -s %CYGWIN_ROOT%\tmp\.X11-unix\X0 >nul del %CYGWIN_ROOT%\tmp\.X11-unix\X0 >nul start C:\cygwin\usr\X11R6\bin\XWin.exe -multiplemonitors -multiwindow -dpi 100 -clipboard run C:\cygwin\usr\X11R6\bin\xterm -cr red -sl 1000 -sb -rightbar -ms red -fg white -bg black -e /usr/bin/bash --login :END --------------- You will need pulist and qgrep which is included in w2k resource kit. Should you not have this then please contact me offlist cygwin@nai.nu Basically this batch file start Xwin if pulist (like ps but for windows) does not return a XWin process. Hope this helps -- Kind regards Geordy Korte