Send keys to an X app & diconnect an X session
I have an application that I generally leave running on my machine, and would like it to shutdown gracefully if possible when the machine shuts down. If I'm not there, and the UPS shuts the machine down, it doesn't shutdown gracefully unless I hit Ctrl-Z. Is there a way I can script sending Ctrl-Z (or any keystroke for future reference) to an X-based application? Sorta like Send Keyboard Keys for Windows at vsisoftware dot com (I can't post URLs yet).
Second, is there a way to disconnect from an X session, so I can reconnect from another machine? Similar to Terminal Services for Windows? I've looked at using VNC, but it's far too slow.
Thanks,
-Spoonie
|