Checking if the X Server is running

O. Olson olson_ord@yahoo.it
Tue Oct 2 08:32:00 GMT 2007


--- Holger Krull ha scritto:

> Holger Krull schrieb:
> > Holger Krull schrieb:
> > I was to fast on my last email. I tested it now:
> > You need (on windows):
> > set DISPLAY=127.0.0.1:0.0& c:\cygwin\bin\bash.exe
> -l /home/krull/test.sh
> > 
> > (it is important that there is no space between
> 0.0 and &)
> > 
> > test.sh:
> > #!/bin/sh
> > ps |grep -i /xwin >/dev/null
> > if [ $? -eq "0" ]
> > then
> >    xterm -e /usr/bin/bash -l &
> > else
> >    run XWin :2 -multiwindow -clipboard
> -silent-dup-error
> 
> that :2 is from my testing, sorry, doesn't belong
> there
> 
> >    xterm -e /usr/bin/bash -l &
> > fi
> > 

Thanks Holger. Now this works perfectly. It does open
up a Windows cmd window – which remains open until I
finish with my app – but I can live with that. 

Thanks Phil Betts – I think now the checkX script also
works. I think my mistake was I was leaving a space
between set DISPLAY=127.0.0.1:0.0 and & - Thankfully
Holger pointed this out. 

O.O. 



      ___________________________________ 
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: http://it.docs.yahoo.com/nowyoucan.html

--
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/



More information about the Cygwin-xfree mailing list