[incise.org] un bust your x server

Recovering keyboard and mouse input in X11

Once upon a time, I had my mouse and keyboard input rudely stolen from me by a rogue SDL app. I had way too much stuff going on in X to throw it all away for some rude app, so I fought my way back! Here's how I did it...

Kill the app

First order of business is to kill the app that's causing the problem in the first place. If you can switch to a console with Ctrl+Alt+Fn, you're good to go, otherwise you'll have to login remotely. If you have no other machines handy, you may have to admit defeat and either kill X with Ctrl+Alt+Backspace, or, even worse, reboot the machine. kill, kill, and kill -9 until there is no remaining trace of the program.

Get your input back

There's a number of loosely related and intertwined steps to this.

Thanks to "fhffhqvb" and "izn0g" from #debian on freenode, and "Yorick" from #sdl on freenode.


Nick Welch <nick@incise.org>