Thanks for the quick replies,
But how can I do this from a script?
I need my 'run on disconnect' script to end the program automatically, not do it manually.
Doing it manually works, but how do I write a script to find the right pid?
I trying to make Linux 'Wife friendly'