Ubuntu – Disabling Control-Alt-Delete shutdown is not working

10.04shortcut-keysshutdown

I'm running Ubuntu 10.04 in a Virtual Machine on a Windows 7 computer. If I press Ctrl-Alt-Delete when the Ubuntu VM is in focus, the Ubuntu system sees it and shuts down after 60 seconds. This does not happen if the Ubuntu VM is not in focus. I know I could just "be careful", but I'd like to avoid accidentally shutting down my Ubuntu system every time I lock my machine.

I found the following directions for disabling this behavior on Ubuntu:

To disable Ctrl+Alt+Del REBOOT edit
#sudo nano /etc/init/control-alt-delete.conf comment out:

#start on control-alt-delete
#task
#exec shutdown -r now “Control-Alt-Delete pressed”

I tried that, but it's not working (even after rebooting the system). Considering how common this answer appeared to be, I'm a bit confused. Any other ways to disable this behavior? Thanks!

Best Answer

Not sure if this works the same in 10.04, but in 12.04 this is controlled by keyboard shortcuts, and you can easily disable it using GUI:

enter image description here

Is a similar dialog available in 10.04? (try in System > Preferences menu)

Also, as Ben pointed out, even if you prevent Ubuntu from Logging out / Rebooting / Shutting down etc, the simple fact of Ubuntu receiving the Ctrl+Alt+Del event from the VM software may prevent your host OS from acting upon it when Ubuntu has the focus.

That means you may fix the issue in Ubuntu side, but you would still need to make sure that this event is not captured by the client, even if it has the focus.

In VirtualBox, there's an "Auto-Capture Keyboard" option that controls this behaviour.