re: XWin -silent-dup-error not so silent

2006-09-09 Thread Jeff Cook
Anybody have a work-around for this super-annoying problem?

Jeff Cook
IT Consultant 3
Facility Services
University of Oregon

XWin -silent-dup-error not so silent
* From: Kenneth Nellis knellis at syntek-usa dot com
* To: cygwin-xfree at cygwin dot com
* Date: Mon, 24 Jul 2006 15:50:19 -0400
* Subject: XWin -silent-dup-error not so silent
* Reply-to: cygwin-xfree at cygwin dot com

I find it convenient to have a single icon in my Windows task bar 
that, when clicked, opens an xterm window without me having to know 
or care about whether or not Xserver is already running. My icon is 
associated with Cygwin's X11's standard startxwin.bat script that 
essentially runs the following two commands (edited here for clarity):

  \cygwin\bin\run XWin -multiwindow -clipboard -silent-dup-error
  \cygwin\bin\run xterm -e /usr/bin/bash -l

This script is designed to do what I want: The first command starts 
Xserver, which is smart enough to detect whether another instance is 
running and to die if it is. Its (undocumented) -silent-dup-error 
switch, no doubt, is supposed to cause Xserver to be silent about 
dying, which is what you want for this scenario. The second command, 
then, starts xterm in the presence of a single Xserver.

This script has worked fine until I upgraded Xserver from 6.8.2.0-4 
to 6.8.99.901-1. Now Xserver is rather unsilent in the presence of 
another instance, displaying a Windows alert box (A fatal error has 
occurred and Cygwin/X will now exit...; see attached) and creating 
a /tmp/XWin.log file.

I was hoping to learn whether this behavior is considered a bug or 
not and, if it is, whether it's under consideration for a fix.

BTW, this change was mentioned in two previous posts--by Chuck on 7/12 
(Xwin.log error) and by me on 7/17 (fatal error with X Server 
6.8.99.901-1)--but neither post illicited a satisfactory response. 
Please forgive me for making one additional attempt.

--Ken Nellis

Attached: cygcheck.out, XWinAlert.bmp
Attachment: cygcheck.out
Description: Binary data
Attachment: XWinAlert.bmp
Description: Windows bitmap


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: XWin -silent-dup-error not so silent

2006-09-09 Thread René Berber
Jeff Cook wrote:

 Anybody have a work-around for this super-annoying problem?

I you are using a script like the sample sent by Kenneth, why not doing
something simple as:

PID=`ps -a | grep XWin | cut -d   -f 6`
if [ -z $PID ]; then
   \cygwin\bin\run XWin -multiwindow -clipboard -silent-dup-error
fi
   \cygwin\bin\run xterm -e /usr/bin/bash -l

You can also use pgrep in PID=... if you have it (makes that part clearer and
more portable).
-- 
René Berber


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/