XorgCtrlAltBackspace

Differences between revisions 3 and 37 (spanning 34 versions)
Revision 3 as of 2007-05-23 00:39:05
Size: 5606
Editor: dyn233046
Comment: Fleshed out from default
Revision 37 as of 2008-06-11 21:16:16
Size: 6265
Editor: c-67-168-235-241
Comment:
Deletions are marked like this. Additions are marked like this.
Line 10: Line 10:
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 explicity. 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 proposes to modify how this key combination works such that by default the user must hold the keys for 2 seconds in order for it to take effect.
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 immediately exited X (and thus reset the graphics system back to the login screen), has been modified to require it to be held for 2 seconds before taking effect. This should help reduce the frequency of unexpected data loss and activity interruption for users unaware of its function that strike it accidentally.
Line 24: Line 18:
The key combination of Ctrl-Alt-Backspace is specifically designed to lose data, since it destroys the user's current graphical shell. 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 when using other Ctrl-Alt- key combinations. This can cause unexpected data loss and workflow interruption.

However, disabling the key combination entirely would not be desirable, as it is an important way for exiting/restarting X that is useful particularly when X has locked up. A pop-up confirmation dialog is also not desirable, firstly because in one of the main use-cases for the key combo (a stuck Xorg), it's highly likely the window manager could not be depended on to display a dialog, and secondly because having a dialog would be an irritant both for accidental and intentional users.

Making the key combination require being held for a couple seconds seems like a reasonable compromise.
Line 28: Line 26:
* 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. * Brian 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. Brian wants to close Blender as he is finished with it and needs to free up some memory for the GIMP. He remembers in Windows he could bring up an application list via Ctrl-Alt-Delete, but that doesn't work so he tries pressing Ctrl-Alt-Backspace. 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.
Line 30: Line 28:
* 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. * 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.
Line 32: Line 30:
* 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. * Joel's computer interface has frozen due to a graphics driver problem. He still has daemons running which need to remain open, so he cannot reboot. He remembered that Ctrl-Alt-Backspace would restart X, and is surprised at first that it doesn't restart immediately but he holds it down just in case, and after a couple seconds X restarts and he's back in business. He's curious why it didn't restart immediately, but after investigating it he learns that he can control the delay in his xorg.conf, but he doesn't mind the new behavior so leaves it as is.
Line 36: Line 34:
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. This spec assumes that users do not use the Ctrl-Alt-Backspace functionality regularly, and that those who do will not be terribly inconvenienced by having to hold it for 2 seconds.
Line 40: Line 38:
Either the "zap" function of the X server will be disabled, or the feature will be documented more explicitly (help pages, etc.). A 2 second delay to the Ctrl-Alt-Backspace key combination will be added to xorg-server.

A new 'ZapDelayTime' ServerFlag configuration parameter will be added for users to use in xorg.conf to control the delay before terminating the X session. Setting it to 0 will restore the old behavior, where X exits immediately.
Line 43: Line 43:
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.
 * hw/xfree86/parser/xf86tokens.h: add ZAPDELAYTIME token
 * hw/xfree86/common/xf86Privstr.h: add zapDelayTime field
 * hw/xfree86/common/xf86Globals.c: set default value of zapDelayTime to 2
 * hw/xfree86/common/xf86Config.c: add FLAG_ZAPDELAYTIME with call to xf86GetOptValBool()
 * hw/xfree86/parser/Flags.c add to ServerFlagsTab[] structure and xf86parseFlagsSection(void)'s case statement
 * hw/xfree86/xorgconf.cpp: Add "ZapDelayTime" option
 * hw/xfree86/doc/man/Xorg.man.pre man page
 * hw/xfree86/doc/man/xorg.conf.man.pre man page
 * hw/xfree86/utils/xorgconfig/xorgconfig.c xorg.conf template
 * hw/xfree86/common/xf86Events.c: Modify the KEY_BackSpace case branch in xf86CommonSpecialKey so it calls xf86ProcessActionEvent(ACTION_TERMINATE, NULL) only after zapDelayTime's configured time delay.
   * Need to record when the Press action started
   * On subsequent Press or Release actions, compare time to zapDelayTime
   * If Release happens before zapDelayTime, reset the delay timer
 * xkb/xkbActions.c: Ditto changes done to xf86Events.c
Line 47: Line 61:
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. To test the implementation the keypress should be held for < 2 sec and if nothing happens until time == 2 sec, then it is successful.
Line 49: Line 63:
== Outstanding Issues == The ZapDelayTime parameter should be set to several values (0, 5, 100) and verified that the behavior is delayed by that amount of time.
Line 51: Line 65:
Either approach can be taken relatively easily. This spec exists to form the discussion over which should be used. == Discussion ==
Line 53: Line 67:
== BoF agenda and discussion == Previous discussion has been taken into account with this version of the spec, and is archived at ["XorgCtrlAltBackspace/Discussion"].
Line 55: Line 69:
Please write opinions about the direction of this spec here. == External links ==

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

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 proposes to modify how this key combination works such that by default the user must hold the keys for 2 seconds in order for it to take effect.

Release Note

The key combination of Ctrl-Alt-Backspace, which previously immediately exited X (and thus reset the graphics system back to the login screen), has been modified to require it to be held for 2 seconds before taking effect. This should help reduce the frequency of unexpected data loss and activity interruption for users unaware of its function that strike it accidentally.

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 when using other Ctrl-Alt- key combinations. This can cause unexpected data loss and workflow interruption.

However, disabling the key combination entirely would not be desirable, as it is an important way for exiting/restarting X that is useful particularly when X has locked up. A pop-up confirmation dialog is also not desirable, firstly because in one of the main use-cases for the key combo (a stuck Xorg), it's highly likely the window manager could not be depended on to display a dialog, and secondly because having a dialog would be an irritant both for accidental and intentional users.

Making the key combination require being held for a couple seconds seems like a reasonable compromise.

Use Cases

* Brian 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. Brian wants to close Blender as he is finished with it and needs to free up some memory for the GIMP. He remembers in Windows he could bring up an application list via Ctrl-Alt-Delete, but that doesn't work so he tries pressing Ctrl-Alt-Backspace. 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's computer interface has frozen due to a graphics driver problem. He still has daemons running which need to remain open, so he cannot reboot. He remembered that Ctrl-Alt-Backspace would restart X, and is surprised at first that it doesn't restart immediately but he holds it down just in case, and after a couple seconds X restarts and he's back in business. He's curious why it didn't restart immediately, but after investigating it he learns that he can control the delay in his xorg.conf, but he doesn't mind the new behavior so leaves it as is.

Assumptions

This spec assumes that users do not use the Ctrl-Alt-Backspace functionality regularly, and that those who do will not be terribly inconvenienced by having to hold it for 2 seconds.

Design

A 2 second delay to the Ctrl-Alt-Backspace key combination will be added to xorg-server.

A new 'ZapDelayTime' ServerFlag configuration parameter will be added for users to use in xorg.conf to control the delay before terminating the X session. Setting it to 0 will restore the old behavior, where X exits immediately.

Implementation

  • hw/xfree86/parser/xf86tokens.h: add ZAPDELAYTIME token
  • hw/xfree86/common/xf86Privstr.h: add zapDelayTime field
  • hw/xfree86/common/xf86Globals.c: set default value of zapDelayTime to 2
  • hw/xfree86/common/xf86Config.c: add FLAG_ZAPDELAYTIME with call to xf86GetOptValBool()
  • hw/xfree86/parser/Flags.c add to ServerFlagsTab[] structure and xf86parseFlagsSection(void)'s case statement

  • hw/xfree86/xorgconf.cpp: Add "ZapDelayTime" option

  • hw/xfree86/doc/man/Xorg.man.pre man page
  • hw/xfree86/doc/man/xorg.conf.man.pre man page
  • hw/xfree86/utils/xorgconfig/xorgconfig.c xorg.conf template
  • hw/xfree86/common/xf86Events.c: Modify the KEY_BackSpace case branch in xf86CommonSpecialKey so it calls xf86ProcessActionEvent(ACTION_TERMINATE, NULL) only after zapDelayTime's configured time delay.

    • Need to record when the Press action started
    • On subsequent Press or Release actions, compare time to zapDelayTime
    • If Release happens before zapDelayTime, reset the delay timer
  • xkb/xkbActions.c: Ditto changes done to xf86Events.c

Test/Demo Plan

To test the implementation the keypress should be held for < 2 sec and if nothing happens until time == 2 sec, then it is successful.

The ZapDelayTime parameter should be set to several values (0, 5, 100) and verified that the behavior is delayed by that amount of time.

Discussion

Previous discussion has been taken into account with this version of the spec, and is archived at ["XorgCtrlAltBackspace/Discussion"].

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)