Wiki Ubuntu-it

Indice
Partecipa
FAQ
Wiki Blog
------------------
Ubuntu-it.org
Forum
Chiedi
Chat
Cerca
Planet
  • Pagina non alterabile
  • Informazioni
  • Allegati

Versione 1 del 13/09/2009 13.12.16

Nascondi questo messaggio

Ubuntu Karmic 9.10 or Higher

Ctrl+Alt+Backspace (i.e. the shortcut which was used to restart the X server) has to be enabled in a different way with respect to previous releases of Ubuntu.

This is due to the fact that "DontZap" is no longer an option in the X server and has become an option in XKB instead.

As a result, now it's very easy to use your Desktop environment of choice (e.g. GNOME, KDE) to enable or to disable the Ctrl+Alt+Backspace shortcut. It is also possible to do it without KDE or GNOME.

It is recommended that you do it from your desktop environment of choice (as you may find it easier to do so).

Using GNOME

* Get to the System->Preferences->Keyboard menu.

* Select the "Layouts" tab and click on the "Layout Options" button.

* Then select "Key sequence to kill the X server" and enable "Control + Alt + Backspace".

Using KDE

* Launch "systemsettings"

* Select "Regional & Language".

* Select "Keyboard Layout".

* Click on "Enable keyboard layouts" (in the Layout tab).

* Select the "Advanced" tab. Then select "Key sequence to kill the X server" and enable "Control + Alt + Backspace".

Using the command line

You can type the following command to enable Zapping immediately.

setxkbmap -option terminate:ctrl_alt_bksp

If you're happy with the new behaviour you can add that command to your ~/.xinitrc in order to make the change permanent.

Using HAL

You can add the following line in /usr/share/hal/fdi/policy/10osvendor/10-x11-input.fdi (inside the <match key="info.capabilities" contains="input.keys"> section):

<merge key="input.xkb.options" type="string">terminate:ctrl_alt_bksp</merge>

Ubuntu Jaunty 9.04

The DontZap option in the /etc/X11/xorg.conf file enables or disables the CTRL-ALT-BACKSPACE shortcut to restart the X-server. In previous Ubuntu releases, this shortcut was enabled by default, however this will change starting with 9.04 "Jaunty", as a number of users have complained about accidentally restarting their X-Server.

You can re-enable this shortcut by editing your /etc/X11/xorg.conf,

sudo nano /etc/X11/xorg.conf

then type your password, press enter, and use the simple text editor to add a ServerFlags section like this to the start, end, or middle of the file:

Section "ServerFlags"
        Option          "DontZap"               "false"
EndSection

And then restart the Computer (or log out and back in) to apply the changes. The shortcut should be re-enabled now.

If you want to disable the shortcut, either delete the section (in Jaunty) or change it to this:

Section "ServerFlags"
        Option          "DontZap"               "true"
EndSection

And then restart the Computer (or log out and back in) to apply the changes. The shortcut should be disabled now.

Aside: sticky keys

It may be worth mentioning that the Accessibility shortcuts (for both KDE and Gnome) are enabled by holding the shift-key for 8 seconds. (This is easy to do if, say, selecting multiple items with the mouse). As a result, it's easy to inadvertently enable "Sticky Keys". Now, if you press Ctrl and then release it, and a bit later, you press Alt-Bksp (the shortcut to delete a whole word), then Boom! Bye-bye X-session :-(

Also, unlike Ctrl-Alt-Del, the Ctrl-Alt-Bksp shortcut is not trapped. It's instant death (without confirmation) for the X-server, and too bad about your unsaved files. That's why DontZap is a good default.

For anyone missing the ability to kill the X-server in emergency, may I point out Alt-SysRq-R, followed by Ctrl-Alt-F1 (the first puts the keyboard back into Raw mode, i.e. outside the control of the X-server; the latter switches Virtual Terminal.) Or you can use Alt-SysRq-K to kill the current session.


CategoryInTraduzione