having several keyboards on my desk and being used to using the Ctrl-Alt-Del combination to call up the login window of Windows XP, several times I quite unintentionally succeeded in restarting the ubuntu server I'm experimenting with
A bit of googling revealed I should edit the /etc/inittab, but there is no such file in ubuntu 11.10 (Oneric). Further googling revealed the more ubuntu specific file /etc/event.d/control-alt-delete, which also didn't exist. But looking through /etc I discovered that the init directory contained a file named control-alt-delete.conf.
So I edited this file to look as follows:
It works fine, except for one small irritation. After output of the message "Shutdown / restart with Ctrl-Alt-Del is disabled!" it seems to hang, and the user is forced to press ENTER to return to the normal bash or login input prompt.
# control-alt-delete - emergency keypress handling
# This task is run whenever the Control-Alt-Delete key combination is
# pressed, and performs a safe reboot of the machine.
description "emergency keypress handling"
author "Scott James Remnant <email@example.com>"
start on control-alt-delete
# exec shutdown -r now "Control-Alt-Delete pressed"
echo "Shutdown / restart with Ctrl-Alt-Del is disabled!"
Is there any way to change this behavior? Or is this the normal behavior of upstart scripts?