Holger Krull | 1 Oct 18:12 2007
Picon
Picon

Re: Checking if the X Server is running

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

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


Gmane