Checking if the X Server is running

Holger Krull holger.krull@gmx.de
Sun Sep 30 17:34:00 GMT 2007


O. Olson schrieb:
> 	Is there any way of checking if the X Server is
> currently running? Because if you try this again, it
> gives you “A fatal error” … which does not crash your
> computer – but is a bit annoying to me. 
> 

There probably is a more elegant solution but doing
ps |grep Xwin >/dev/null || run Xwin -your options here

will only start Xwin if it is not running already.
(Assuming you will only start one Xwin)

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