The trouble is that, sometimes, the X session stay open after that the user is disconnected (such as when the network link is disconnected)
It occurs in many ways, such as via ltsp or via X11Forwarding with ssh.
How can I detect those sessions with a script and close/kill all the programs that stayed open ?
Thank you !