XorgCtrlAltBackspace

Differences between revisions 19 and 20
Revision 19 as of 2007-08-13 05:07:53
Size: 15633
Editor: host81-156-42-136
Comment: Comment
Revision 20 as of 2007-08-14 19:51:27
Size: 17868
Editor: c-67-169-207-142
Comment:
Deletions are marked like this. Additions are marked like this.
Line 14: Line 14:
'''EITHER'''

The largely unknown
key combination of Ctrl-Alt-Backspace, which previously reset the graphics system back to the login screen, has been disabled by default to prevent unexpected data loss and activity interruption for users unaware of its function.

'''OR'''

The previously undocumented key combination of Ctrl-Alt-Backspace, which resets the graphics system back to the login screen and potentially loses user's unsaved data as well as interrupting workflow, is now more explicitly detailed to avoid potential accidents for users unaware of its function.
The key combination of Ctrl-Alt-Backspace, which previously exited X (and thus reset the graphics system back to the login screen), has been disabled by default to prevent unexpected data loss and activity interruption for users unaware of its function.
Line 24: Line 18:
The key combination of Ctrl-Alt-Backspace destroys the user's current graphical shell, which by definition can cause data loss. In Microsoft Windows this key combination does not produce any data loss, and can be used to bring up the system monitor ("task manager") or choose between logout/shutdown/task manager/etc. (depending on the system setup). An Ubuntu user who has used Windows (which is an overwhelming majority given the current unbalance) experimenting with known Windows keyboard shortcuts in Ubuntu could lose unsaved data from open applications and interrupt her workflow (logging in again would bring up an empty session if session autosave is not in use) since the effect of this key combination is not made clear to new users. The functionality provided by Ctrl-Alt-Backspace should rarely be needed, and if it is then the same function can be executed from a console. The key combination of Ctrl-Alt-Backspace terminates the user's current graphical shell, which can cause data loss if invoked accidentally.  For some keyboards, backspace is in a location that can lead to accidentally hitting Ctrl-Alt-Backspace hits An Ubuntu user who has used Windows experimenting with known Windows keyboard shortcuts in Ubuntu could lose unsaved data from open applications and interrupt her workflow (logging in again would bring up an empty session if session autosave is not in use) since the effect of this key combination is not made clear to new users. The functionality provided by Ctrl-Alt-Backspace should rarely be needed, and if it is then the same function can be executed from a console.
Line 40: Line 34:
Either the "zap" function of the X server will be disabled, or the feature will be documented more explicitly (help pages, etc.). The "zap" function of the X server will be disabled in dexconf.
Line 43: Line 37:
The line {{{option "DontZap" true}}} needs to be added to disable the key combination. The best method for documenting the function of the shortcut should be determined in the discussion of which plan to implement. If disabled this should be made known for a period around its implementation to let users (especially those who would previously have recommended it to new users in forums/IRC/etc.) know of the change. The line {{{option "DontZap" true}}} needs to be added to disable the key combination. This should be made known for a period around its implementation to let users (especially those who would previously have recommended it to new users in forums/IRC/etc.) know of the change.

Since "DontZap" may not be obvious to advanced users looking for an option to "switch Ctrl-Alt-Backspace back on", this option should be clearly commented so it is obvious for these users to turn it back on.

The code to add to dexconf is as follows:

 ### SERVER FLAGS

  exec 4>"$DEXCONFTMPDIR/ServerFlags"
  cat >&4 <<SECTION
 Section "ServerFlags"

        # Disable Ctrl-Alt-Backspace.
        #
        # Change this option to "false" if you prefer the traditional
        # behavior of exiting Xorg. Users report hitting
        # this key combination accidentally, leading to data-loss.
        # (For more info, see: https://wiki.ubuntu.com/XorgCtrlAltBackspace)
        Option "DontZap" "true"

 EndSection
Line 49: Line 64:
== Outstanding Issues == == Future Work ==
Line 51: Line 66:
Either approach can be taken relatively easily. This spec exists to form the discussion over which should be used.

* A GUI option for turning this on or off (perhaps in displayconfig-gtk?)
 * It is assumed that the ctrl-alt-backspace key combo is not going to be needed except by advanced users, and it is further assumed these advanced users will be fine with editing their xorg.conf to re-enable it if they wish. If either of these assumptions prove false, then for future work could be the addition of a GUI control in System:Preferences:Keyboard_Shortcuts to allow re-enabling it, using sed to alter xorg.conf.
Line 93: Line 106:
-----

I've prepared a patch to implement this change once/if the spec is officially approved; the code to be added to dexconf is listed above. This is going to be a controversial change if made, so we definitely need to doublecheck that it's really the way we want to go with Ubuntu.

I've also altered the spec a bit, as it appeared to originally have some confusion between ctrl-alt-backspace and ctrl-alt-delete on windows. I've also neutralized the language a bit; it's not evil, it's just not very kid-friendly. ;-)

Regarding changing the keyboard shortcut to something less likely to get accidentally punched - I suspect people used to ctrl-alt-backspace would be just as equally put off by having this changed as having it disabled. As well, while there is a clear flag in xorg.conf for switching this on/off, I didn't spot a way to remap it.

Regarding a GUI control for setting it, I've added this as future work - see above.

Regarding a handler to display a confirmation dialog when hitting the key combo, as was pointed out, this directly conflicts with ctrl-alt-backspace's main use case (to bypass the window manager and just kill everything asap). If we hear that people routinely use ctrl-alt-backspace for logging out, then that might make sense, but I would assume ctrl-alt-del would be the more expected shortcut in that case.

Regarding mapping this to unrelated functionality, I think this should be strongly discouraged. We should not get users accustomed to using ctrl-alt-backspace for something different, in case they sit down at a different Linux box where it works traditionally.

All-in-all, I think the arguments on both sides are compelling, but to me the risk of data-loss for ordinary users is what tips the scales in favor of disabling. I think this is just one of those rough (but well-loved) edges that needs sanding in order to bring Ubuntu closer to solving bug #1.

-- BryceHarrington

Please check the status of this specification in Launchpad before editing it. If it is Approved, contact the Assignee or another knowledgeable person before making changes.

Summary

The Ctrl-Alt-Backspace key combination currently "zaps" (hard-restarts) the X server, and thus loses any unsaved data in applications, etc. This key combination is also largely undocumented, so users (probably ex-Windows users) may press this key combination without expecting data loss. This spec covers discussion over either disabling this key combination by default, or documenting it more explicitly.

Release Note

The key combination of Ctrl-Alt-Backspace, which previously exited X (and thus reset the graphics system back to the login screen), has been disabled by default to prevent unexpected data loss and activity interruption for users unaware of its function.

Rationale

The key combination of Ctrl-Alt-Backspace terminates the user's current graphical shell, which can cause data loss if invoked accidentally. For some keyboards, backspace is in a location that can lead to accidentally hitting Ctrl-Alt-Backspace hits An Ubuntu user who has used Windows experimenting with known Windows keyboard shortcuts in Ubuntu could lose unsaved data from open applications and interrupt her workflow (logging in again would bring up an empty session if session autosave is not in use) since the effect of this key combination is not made clear to new users. The functionality provided by Ctrl-Alt-Backspace should rarely be needed, and if it is then the same function can be executed from a console.

Use Cases

* Bryce is a relatively new Ubuntu user working on a large image file in the GIMP, but also has Blender open on a different workspace which he used to render the image. Bryce wants to close Blender as he is finished with it and needs to free up some memory for the GIMP. He tries pressing Ctrl-Alt-Backspace, like he used to do in Windows, to bring up a list of open applications so he can close Blender. The key combination does nothing so he decides to open the System Monitor from the System > Administration menu instead. Once Blender is closed he continues to work on his image in the GIMP, saving it when he is finished.

* Katie is writing a guide to help people who are used to Windows to migrate over to Ubuntu. She reads the help manuals for inspiration, then later she is experimenting to find similar functionality between the two systems that she can document. She avoids pressing Ctrl-Alt-Backspace and losing the document, which she has not saved yet, because she read in the help manuals that this would lose her work and send her back to the login screen.

* Joel is accessing the Internet from a friend's computer because the interface on his has frozen due to a graphics driver problem. He still has daemons running which need to remain open, so he cannot reboot. Accessing a chatroom from his friend's computer he is told that pressing Ctrl-Alt-F1, logging in and typing sudo /etc/init.d/gdm restart will restart his graphics system for him, and it will execute in a clean way so his system will not have any unneeded temporary files, etc.

Assumptions

This spec assumes that users do not use the Ctrl-Alt-Backspace functionality regularly and thus would not mind its disabling by default. If this assumption is false then the documentation will be improved instead. The assumption that users who do occasionally use this key combination also know other methods of restarting the X windowing system is made. This spec also assumes that many users will press this key combination without knowing what it does, either out of habit or experimentations, after using a Microsoft Windows system.

Design

The "zap" function of the X server will be disabled in dexconf.

Implementation

The line option "DontZap" true needs to be added to disable the key combination. This should be made known for a period around its implementation to let users (especially those who would previously have recommended it to new users in forums/IRC/etc.) know of the change.

Since "DontZap" may not be obvious to advanced users looking for an option to "switch Ctrl-Alt-Backspace back on", this option should be clearly commented so it is obvious for these users to turn it back on.

The code to add to dexconf is as follows:

  • ### SERVER FLAGS
    • exec 4>"$DEXCONFTMPDIR/ServerFlags" cat >&4 <<SECTION

    Section "ServerFlags"

    • # Disable Ctrl-Alt-Backspace. # # Change this option to "false" if you prefer the traditional # behavior of exiting Xorg. Users report hitting # this key combination accidentally, leading to data-loss.

      # (For more info, see: https://wiki.ubuntu.com/XorgCtrlAltBackspace) Option "DontZap" "true"

    EndSection

Test/Demo Plan

To test the implementation the keypress should be used and if nothing happens then it is successful. Disabling the "NoZap" option in xorg.conf should also be tested to assure that those preferring the old system can change back if needed. Help documentation can be opened and checked for accuracy and relevancy.

Future Work

  • It is assumed that the ctrl-alt-backspace key combo is not going to be needed except by advanced users, and it is further assumed these advanced users will be fine with editing their xorg.conf to re-enable it if they wish. If either of these assumptions prove false, then for future work could be the addition of a GUI control in System:Preferences:Keyboard_Shortcuts to allow re-enabling it, using sed to alter xorg.conf.

BoF agenda and discussion

Personally, I use ctrl-alt-bkspace to restart Xorg all the time, but I'm an admittedly unique corner case. As long as there is a documented way to reactivate it (a. comment in xorg.conf, b. on a wiki page, c. maybe in a GUI config tool), this should be fine.

I don't think simply documenting it is an adequate solution. Who reads docs? If it truly is an unexpected data-loss situation for users, then Ubuntu should be changed so that by default it does not happen. -- Bryce

I also use the ctrl-alt-backspace combo quite frequently, as I tend to push my system too hard (running Beryl, 3D apps, etc at the same time). I'm sure that many other people use this combo as well. Maybe it would be good to add an option in the installer, allowing people to choose a set of shortcuts mimicking Windows or keeping GNOME shortcuts. I know that Windows users tend to expect ctrl-alt-del to open the system monitor as well, and there may be others, so this may need looking into. --maccam94

I use ctrl-alt-backspace quite often myself, but I expect that most users don't use it and don't even know about the feature. In addition, I expect that the users who do use it are those who would also have the least trouble enabling it if it were disabled by default. -- ConstantineEvans

How about using more complicated sequence e.g. Ctrl-Alt-Shift-Backspace ? I suppose no one will have clicked this by mistake. -- AlanTam

I think it should be completely disabled. Even if there is an almost null probability that a user hits those keys, it can still have catastrophic consequences (and with so many people using ubuntu, there will be someone hitting those keys). This command kills the X server without any warning, and is there, imho, only for debugging purposes. It should not be enabled in an end user desktop. If someone really wants this to be enabled, fine, he can still enable it, and in doing so, he is making himself aware of the danger. In windows, hitting the ctrl-alt-del command does not kill anything, it just brings up a window where one can select the process to kill. My next argument is the following. The only purpose of this command is killing a crashed X server, right? Come on, Ubuntu is a high-end user-friendly desktop and the X server is not supposed to crash on the first hand. People who install ubuntu are not just Linux freaks any more, they want something that is stable and reliable. I couldn't imagine explaining to someone why such a command exist. What should I say? "You know, sometimes your machine freezes and in that case you have the magic combination...". No ! --Fterrier

There is no such thing as a completely stable system. At least not on desktop devices. For this reason I think that Ctrl-Alt-Backspace should not be disabled. Or what do you expect users to do when things go awry? Reset? Pull the plug? The best argument against Ctrl-Alt-Backspace was, that X is killed without warning. So I think the solution lies in providing a dialogue, telling users what will happen, if they press Ctrl-Alt-Backspace again. And is nothing works, pressing Ctrl-Alt-Backspace more than once or twice will kill the X-server without prompting. As for changing the key-combination: it is a standard, so we best schouldn't touch it. --Sokraates

No, right, there is no stable system, but what we should be heading towards is a stable system. I alos think most users would simply reboot when things go wrong. Advanced users will either have reenabled the functionality of ctrl-alt-backspace or will go to a tty term and will restart the X server from there. Now, I think providing a dialog is a good idea, but how do you want to display such a dialog if the X sever is crashed ? I was thinking about bringing up a new X on 0:1 (or whatever that is) with a user friendly window on it asking the user what he wants (killing the primary X server, killing an app, etc...) -- Fterrier

Rebooting is always an option, but one needs to consider, that firstly Linux prides itself, that usually you don't need to reboot (a tradition we should keep) and secondly you waste time. Should the X-server crash, such a dialog could be displayed using curses, but I doubt that makes sense, if the X-server is already dead, i.e. you've lost the data anyway. But of course, the app started pushing Ctrl-Alt-Backspace could check for a running X-server and then display the message using curses (stating something like 'It seems, your enter non-geek term for X-server has crashed') or alternatively GTK/Qt/whatever is available. The main scope of this blueprint, though, was on users accidentally hitting Ctrl-Alt-Backspace. So for those a dialog in GTK/Qt/whatever would be just fine. --Sokraates

I add my support that this option should be removed by default, it is redundant (there are other more explicit ways of killing an xserver) and dangerous as it kills the server without warning. At the very least if it is not removed then the process of its activation must be made more difficult. In the absence of removal I suggest the following alternative: modify the kill action to require two presses of cntl-alt-backspace spaced by >=1 second. On the first press a dialogue box appears explaining what a second press of cntl-alt-backspace will do. This should hopefully be sufficient warning to the simple user while not really affecting the experience user. The purpose of the delay between the key presses is to prevent an accidental double tap (usually rapid) from killing the server. I still favour the disabling of this keypress however. From experience with many non-technical users I fail to believe an ordinary user would bother with a slightly more technical solution (diagnostic and implimentation) to "fixing" their machine than just rebooting it. --AlexMeakins

Why not make Ctrl+Alt+Backspace show a dialog with information and a "Cancel" and "Zap" button? I'm not sure if this is technically possible, but doesn't the Zap option just kill X anyway? -- WesleyStessens

I think adding a confirmation box would fix this issue, but personally I only ever use Ctrl-Alt-Backspace when something has crashed and screwed up X too much to recover (even after switching to a VT to kill whatever process has caused it). In such a situation a confirmation box wouldn't be any help, since X has gone wrong (if I can click in a confirmation box, then I might as well click on the logout button), so I am personally in favour of disabling it altogether. Since making people run "sudo /etc/init.d/gdm restart" in a VT is a little long winded to restart the server properly (if they don't reenable zapping, obviously), making a default alias like "sudo restartx" or something would be nice to have.

There is one huge mistake in this proposal. Windows users use Ctrl+Alt+Delete shortcut, not Ctrl+Alt+Backspace (!!). A lot of windows users know Ctrl+Alt+Delete shortcut, but none of them knows Ctrl+Alt+Backspace. They will not trigger this combination intentionally. This whole draft stands on wrong information. By my experience, Ctrl+Alt+BS is one of the most usefull shortcuts in Ubuntu. I use it regularly, bad things just happen, and they happen often. -- KamilPáral

The fact that few windows users are familiar with the combination ctrl+alt+backspace coupled with the close proximity of the delete key to the backspace key on many keyboards is what makes this discussion all the more important. It is a very dangerous key combination as it contains absolutely no warning and can easily cause the loss of data in open applications. It is the preserve of the more experienced user who should be more than capable of re-enabling it if necessary. As I have said before a basic user e.g. my mum is not going to start using ctrl-alt-backspace etc in preference to hitting the magic-fix-all-button that is the PC's reset switch. It is utterly redundant and more dangerous to common, clumsy figured, basic users than it is useful. It should be diabled by default. --AlexMeakins

  • ["Warbo"]: I agree. For Windows, the Ctrl-Alt-Delete shortcut works with either control key, either Alt key (I think), but most importantly it also works with the Delete key, the Backspace key or the full stop key on the numeric keypad (the period key for the Yanks). Ctrl-Alt-Backspace zaps the X server in Ubuntu, which is dangerous and should be disabled IMHO, Ctrl-Alt-Delete can do various things in Ubuntu, it can send the system into restart mode, it can log out (in Enlightenment 0.16.x it does this for example) and other such things. I am unaware of Ctrl-Alt-NumPad"." doing anything specific, but I am on my laptop at the moment and don't have a proper numpad to try. Any of these actions which perform unsafe actions without a confirmation should be disabled or given a confirmation box, those which could confuse and potentially lose work for users should be disabed altogether (which I think applies to zapping X and restarting the system). E16's logout box is no problem though, as it has a confirmation and no countdown, so things like that can be left. Just for the record, when I used to use Windows systems I would use Ctrl-Alt-Backspace simply because the Backspace key on my keyboard was nice and big so I could hit it easily, therefore arguments about this being in the wrong place are unjustified; this discussion needs to go on, as should discussion about changing other long-practiced behaviour (although probably in separate specs to complement this one, so the merits and drawbacks of each can be seen, but the discussion about a need for this generally, like this comment, aren't duplicated over and over. That's my thoughs on the issue.


I've prepared a patch to implement this change once/if the spec is officially approved; the code to be added to dexconf is listed above. This is going to be a controversial change if made, so we definitely need to doublecheck that it's really the way we want to go with Ubuntu.

I've also altered the spec a bit, as it appeared to originally have some confusion between ctrl-alt-backspace and ctrl-alt-delete on windows. I've also neutralized the language a bit; it's not evil, it's just not very kid-friendly. Wink ;-)

Regarding changing the keyboard shortcut to something less likely to get accidentally punched - I suspect people used to ctrl-alt-backspace would be just as equally put off by having this changed as having it disabled. As well, while there is a clear flag in xorg.conf for switching this on/off, I didn't spot a way to remap it.

Regarding a GUI control for setting it, I've added this as future work - see above.

Regarding a handler to display a confirmation dialog when hitting the key combo, as was pointed out, this directly conflicts with ctrl-alt-backspace's main use case (to bypass the window manager and just kill everything asap). If we hear that people routinely use ctrl-alt-backspace for logging out, then that might make sense, but I would assume ctrl-alt-del would be the more expected shortcut in that case.

Regarding mapping this to unrelated functionality, I think this should be strongly discouraged. We should not get users accustomed to using ctrl-alt-backspace for something different, in case they sit down at a different Linux box where it works traditionally.

All-in-all, I think the arguments on both sides are compelling, but to me the risk of data-loss for ordinary users is what tips the scales in favor of disabling. I think this is just one of those rough (but well-loved) edges that needs sanding in order to bring Ubuntu closer to solving bug #1.

-- BryceHarrington

See also:

* http://bugs.freedesktop.org/show_bug.cgi?id=10507 -- Ctrl-Alt-Backspace should request confirmation before killing Xorg * http://bugs.freedesktop.org/show_bug.cgi?id=10510 -- Xorg should use a more unlikely key combination than Control-Alt-Backspace as the server zap key


CategorySpec

XorgCtrlAltBackspace (last edited 2010-06-12 04:57:24 by dhcp198-158)