I run an xbmc media server in my living room, and for the longest time I've been frustrated that sometimes the interface becomes non-responsive which then required me to ssh into the system, kill the xbmc user, and then logging in again. I think I found a solution to at least part of this problem using evrouter to intercept keyboard events, and then kill the xbmc user when a specific key combination is pushed.

First I created an evrouter config file (.evrouterrc) in the xbmc user's home directory, which listens for ctrl+alt+del, and then runs the kill script

"Logitech diNovo Mini" "/dev/input/event15" control+alt key/29 "Shell//usr/local/bin/xbmc-kill"

xbmc-kill:

#!/bin/bash


## This kills all process associated with the xbmc user.

pkill -U xbmc

exit 0

Finally, in order to start evrouter when xbmc started I altered xbmc-standalone to include the following line (right before the crash detection loop):

/usr/bin/sudo /usr/bin/evrouter --config=/home/xbmc/.evrouterrc /dev/input/event15