Checking if the X Server is running

Holger Krull holger.krull@gmx.de
Mon Oct 1 15:08:00 GMT 2007


O. Olson schrieb:
> --- Holger Krull <holger.krull@xxx.xx> ha scritto:

Teach your email program to not include the full email adress while quoting!

 
> #!/bin/sh
> if `ps | grep XWin > /dev/null`

I suggest using grep -i 
to make it case ignoring. I found a cygwin installation that has Xwin and not XWin in the process list.


> 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

My guess is access control, try adding -ac to the xwin parameters to find out.




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