Ubuntu – Disable prtscr+alt gr+e , accidentally killing session

keyboardkilllenovosessionshortcut-keys

when i press the key combination:

altr gr + prtscr + e

my session gets killed, either x or a tty. i discovered this by (repeated) accident… this was not an issue for me before. my current laptop (lenovo x230) has the prtscr key besides the right alt key rather than on the top right section of the keyboard, so i accidentally press them both sometimes.

standard keyboard layout

lenovo x230,t430s keyboard layout


how do i disable it?

thanks!

Best Answer

if so, how do i disable it?

You don't want to disable the Magic SysRq!

The key combination AltSysRq triggers the Magic SystemRequest and allows to enter combinations of single keys to shut down your system in a controlled way, even when everything else has become completely unresponsive.

This is your life-saver. Don't throw it over board ;)


EDIT: The behaviour of SysRq can be controlled by writing the bitmask for the allowed actions to the file /proc/sys/kernel/sysrq. A value of 0 disables everything, so

echo 0 > /proc/sys/kernel/sysrq

will do the job. But you have been warned ;)


EDIT: To disable permanently, add the line:

kernel.sysrq = 0

to /etc/sysctl.conf. either that or create a file in /etc/sysctl.d/* with the mentioned line.

Related Question