This is the mail archive of the
cygwin-xfree
mailing list for the Cygwin XFree86 project.
Re: Checking if the X Server is running
- From: "O. Olson" <olson_ord at yahoo dot it>
- To: cygwin-xfree at cygwin dot com
- Date: Mon, 1 Oct 2007 02:27:35 +0200 (CEST)
- Subject: Re: Checking if the X Server is running
- Reply-to: cygwin-xfree at cygwin dot com
--- Holger Krull <holger.krull@gmx.de> ha scritto:
>
> I suggest you start the shell script from a
> batchfile.
>
> Like:
> C:\cygwin\bin\bash.exe -l yourstartscript.sh
> Or make an Windows Icon with that command.
>
> If yourstartscript.sh is not found you have to give
> the full path to it in cygwin notation.
> Like:
> C:\cygwin\bin\bash.exe -l /home/krull/startscript.sh
>
> There could be a remaining extra Window, can be
> avoided with:
> C:\cygwin\bin\bash.exe -c -l 'run bash -l -c
> "yourstartscript.sh &" '
>
Dear Holger,
In addition to my previous mail, I tried the
following:
I changed the shell script to: (Called it
/usr/local/bin/sd1.sh)
----------------------
#!/bin/sh
if `ps | grep XWin > /dev/null`
then
echo "XWin is Already Started"
else
echo "XWin is Not Started"
fi
----------------------------
I then typed at the Windows CMD prompt:
C:\>C:\cygwin\bin\bash.exe -l /usr/local/bin/sd1.sh
To get the message:
XWin is Already Started
Now I modified the above shell script to:
----------------------
#!/bin/sh
if `ps | grep XWin > /dev/null`
then
xterm -e /usr/bin/bash -l
else
XWin -multiwindow -clipboard -silent-dup-error
xterm -e /usr/bin/bash -l
fi
-----------------------------
I now tried the same command as before: (With Setting
the DISPLAY)
C:\> SET DISPLAY=127.0.0.1:0.0; C:\cygwin\bin\bash.exe
-l /usr/local/bin/sd1.sh
I now get
xterm Xt error: Can't open display: 127.0.0.1:0.0;
C:\cygwin\bin\bash.exe -l /usr/local/bin/sd1.sh
I am not sure where I am going wrong.
Regards,
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/