Checking if the X Server is running

Holger Krull holger.krull@gmx.de
Tue Oct 2 08:53:00 GMT 2007


As someone pointed out in another post the sequence ps |grep has a risk of finding grep itself in the list. The command pgrep combines both and hasn't that risk.
 
> 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. 

That can be avoided by dual nested start like:
C:\cygwin\bin\bash.exe -c -l 'run bash -c -l "Xwin.exe :0 -query 192.168.11.1 -once &" '

The first bash closes after the command and so does the cmd window which started it. The & at the end is important to get a independend process.

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