This is the mail archive of the cygwin-xfree mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Checking if the X Server is running


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]