I want to write a script that will detect whether a particular desktop application is responding and kill it. Is this possible?I know I've seen the GNOME desktop put up a Application is not responding dialog, and I figure it sends some sort of signal to the window and waits a certain amount of time for a response. If there's a way to do something like that, I'd appreciate some details. Thank you!(This is on xfce, if it matters)
How to detect a desktop application hanging
scripting;process management
I can comment on Gnome's Application is not responding dialog, but not directly answer your question.It seems that both Metacity and Mutter use meta_display_ping_window() function to determine the status of a window (read the doc comment in display.c). The default timeout PING_TIMEOUT_DELAY is 5 s. Ping-timeout and response are handled internally by the window manager and at a glance I don't see a simple method to watch this ping-pong party from outside.