View Full Version : Restart X server with remote?

5th January 2013, 02:21 PM
I'm running Fedora on HTPC with XBMC. I'm using remote control simulating keyboard. (so real wireless keyboard and mouse are needless and put away in the closet). However sometimes XBMC freezes so it is necessary to restart X server.
Is it possible to remap ctrl+alt+backspace to another key combination (specifically ctrl+shift+t) to be able to restart X server using my remote control? Or any other way to define new shorctut for it? I'm running XBMC directly from KDM so setting shortcut either in kde or gnome is not what I'm looking for.
Thanks for any suggestions and help.

5th January 2013, 03:15 PM
setxkbmap -option terminate:ctrl_alt_bksp

When you open the session, or in your .xinitrc might work.

Untested by me.

5th January 2013, 03:22 PM
thanks for reply. However my problem is not that ctrl+alt+bckspc does not work, but that I'm not able to "press" it using remote control (which has hard defined key combinations for each button).
So I'm looking for some way to remap zapping to other key combination (I've trying to mess around with definition under /usr/share/X11/xkb/symbols/terminate but with no luck).

5th January 2013, 04:50 PM
Wouldn't other key combos work with that xsetkbmap command? (Again, untested by me.)

Sorry, missed the part about ctl+shift+t in the original post.

5th January 2013, 05:17 PM
You may try:

xmodmap -e "keysym BackSpace = t"

Without any warranty :)

PS: this will map Backspace to t for all applications!

5th January 2013, 07:21 PM
Thanks for suggestion, but since "t" is used also by other buttons on remote, it would not be good to remap it to backspace. Anyway it does not work, after remapping (tried both "t" to "backspace" and vice versa) zapping does not work. So I guess this shorctut must be more "low level".

Must confess that I have no idea how to use setxkbmap to change shortcut, but I guess it will also only remap keyboard layout similar way as Drollis solution? So I'm affraid it will not work either.

On some forum I read that zapping shortcut is hard compiled into X so maybe it is not possible to change it without modyfiyng source code. But it was few years old post so I hope there is some other way :)