2005-01-05:
Disabling control-alt-delete on X11/UNIX

control-alt-delete control-alt-backspace ctrl-alt-del ctrlaltdel control-meta-delete

I have a very funky keyboard (a DataHand) and sometimes I hit ctrl-alt-del by mistake. This kills X11 under UNIX, and that makes me unhappy.

I did lots of searching and found many "solutions" to this problem, only some of which actually are the problem.

Here are some of the suggestions, in the end it was the last one that solved my problem.

1) Turn off the ctrl-alt-del catch in /etc/inittab:

# What to do when CTRL-ALT-DEL is pressed.
#ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
# Nope - I don't like ctrlaltdel..
ca:12345:ctrlaltdel:/usr/bin/test
Then restart with: 'init q'

Update: With newer versions of init this file has been moved to the /etc/event.d directory, probably: /etc/event.d/control-alt-delete

2) For gnome users, change gnome bindings:
- mid-click root window to get gnome menu
- float Customize, click Bindings

3) For enlightenment users, change enlightenment bindings (using a program such as 'e16keyedit').

Enlightenment often has an 'exit enlightenment' binding to ctrl-alt-del that you will need to change, though it won't be used until after you change your X11 config (below)

4) Change the X11 config to ignore ctrl-alt-del. I discovered this by checking the man page for XF86Config. See the part about 'DontZap'.

Find where your X11 config file is (probably something like /etc/X11/XF86Config) and find the ServerFlags section which starts with:

Section "ServerFlags"
And add the DontZap option before the "EndSection":
  Option  "DontZap" "true"
Restart X11 one last time, and then finally your computer should ignore ctrl-alt-del.

Update: With Xorg this file is /etc/X11/xorg.conf and the DontZap option goes in the "ServerLayout" section instead of "ServerFlags"


Back to Solutions.

DaveSource.com - Dave's geek site GetDave.com - all the current Dave Pointers. MarginalHacks - I have an elegant script for that, but it's too small to fit in the margin.