Bug 10507

Summary: Ctrl-Alt-Backspace should request confirmation before killing Xorg
Product: xorg Reporter: Jason Spiro <jasonspiro4>
Component: Server/GeneralAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED WONTFIX QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: shirishag75
Version: git   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Jason Spiro 2007-04-02 12:12:01 UTC
Forwarded from https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/95258 (from the Ubuntu bugtracker):

== Background ==

Every day, many users press Control+Alt+Backspace by accident. Here is some example evidence of how this is so are at the bottom of this bug report.

== Feature request ==

Xorg must somehow request confirmation before terminating after the user presses Ctrl+Alt+Backspace.  Maybe it could show a confirmation dialog box.

== Example evidence ==

"We routinely use backspace to kill a character, C-backspace to kill a word, C-x backspace to kill a sentence, etc. And inevitably, we press C-M-backspace trying to kill an s-expression, just to find ourselves wondering why the screen suddenly turns black for a moment before the login screen appears again. Yup, we zapped the X server, because that is what C-M-backspace does." --http://www.foldr.org/~michaelw/log/programming/lisp/dontzap-emacs (Emacs's C and Java modes use the Ctrl+Alt+Backspace key combination to delete the {}-enclosed structural block to the left of the cursor.)

"How can I configure X not to shutdown when I accidentally press control-alt-backspace?  This happens a lot, believe it or not, while I'm using emacs.  If X were to pop up a confirmation dialog, that
would be even better." -- http://www.answers.google.com/answers/threadview?id=38992

"In the terminal programs I use, alt-backspace erases the word to the left of the cursor.  This is very handy, but when my thumb slips just a small amount it also presses the ctrl key..." -- http://www.lugod.org/mailinglists/archives/vox-tech/2005-09/msg00046.html

"A word to Alt+Backspace and Shift+Alt+Backspace: I have noticed the danger of shutting down X-Windows when you accidentally hit Ctrl+Alt+Backspace instead of one of the two other keystrokes. So, this might be arguable that users might accidentally mistype a keystroke thus losing some work (as I did :-))" -- http://bugs.kde.org/63540

With sticky keys: "I crashed my system accidentally - I wanted Ctrl-Backspace, and got
Ctrl-Alt-Backspace!
Perhaps sticky keys should not stick the combinations:
Ctrl-Alt-[Del|Backspace|Esc]" -- http://lists.freedesktop.org/archives/xorg-bugzilla-noise/2004-September/003354.html

For more examples see: http://www.google.com/search?q=accidentally+hit+%7C+press+%7C+hitting+%7C+pressing+control+%7C+ctrl+alt+backspace+x%7Cxorg

== Note ==

The Cygwin X server for Microsoft Windows disables Ctrl+Alt+Bksp by default, if you re-enable it, when you press Ctrl+Alt+Bksp you get an exit confirmation dialog like the one I am requesting.  There is a screenshot at: http://x.cygwin.com/screenshots/cygx-multiwindow-emacs-exitconfirm-20031224-0010.png
Comment 1 Daniel Stone 2007-04-02 13:50:47 UTC
If you want to disable Ctrl-Alt-Backspace, set Option "DontZap" in the ServerFlags section, I think it is.  Pretty well documented.  The reason it doesn't (and won't) show a dialog box, is because it's the 'the server needs to die _now_' emergency combination.  Maybe it's set up the wrong mode for your laptop panel and is starting to bloom it.  Maybe your mouse is dead and you have no way to kill your session otherwise (or click okay).  Maybe your monitor isn't showing anything, so you can't click anything.

Either way, Ctrl-Alt-Backspace is defined as the emergency exit.  If you don't want it enabled ... disable it?
Comment 2 Jason Spiro 2007-04-02 14:09:05 UTC
Daniel, thanks your reply, and I see your point about a zap ability having useful uses.  (Btw I am arguing not that you disable the option for me, but also for my fellow students and for all Xorg users.  :-) )  I have just filed bug 10510 ("Xorg should use a more unlikely key combination than Control-Alt-Backspace as the server zap key") to suggest something less severe and CC'ed you.  I hope you don't mind.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.