How to kill XWin from a script

fergus@bonhard.uklinux.net fergus@bonhard.uklinux.net
Mon Jan 26 06:18:00 GMT 2004


This might be well-known, in which case sorry for wasting your time.
It can be inconvenient to have one or several copies of XWin remaining after
exiting Cygwin.
You can do "kill PID" but for this you need to know what the PID is and then
type the command explicitly.
A command (or script) which will kill them all stone dead without previous
reference to ps is

    kill `ps | grep XWin | awk '{print $1}'`

Put it in .bash_logout? Or wherever suits.

Fergus




More information about the Cygwin-xfree mailing list