How to Enable Ctrl+Alt+Backspace to Kill X Server on Ubuntu 11.10

How to Enable Ctrl+Alt+Backspace to Kill X Server on Ubuntu 11.10

Three methods to re-enable the Ctrl+Alt+Backspace shortcut for killing the X server on Ubuntu 11.10 Oneiric Ocelot, with explanations of when and why you'd need it.

Tested on: [Unity GNOME][11.10 12.04 12.10]

There’s a specific kind of panic that every Linux desktop user knows: the screen freezes, the mouse cursor won’t move, and keyboard shortcuts do nothing. In the old days—before Ubuntu 9.04—you could press Ctrl+Alt+Backspace to kill the X server and get back to a login screen. It was brutal (no save prompts, everything dies) but it worked. Starting with Jaunty, Ubuntu disabled this shortcut to protect users from accidental data loss. This guide shows three ways to bring it back on Ubuntu 11.10 Oneiric Ocelot.

Ubuntu 11.10 keyboard settings

What Ctrl+Alt+Backspace Actually Does

When enabled, pressing Ctrl+Alt+Backspace sends a termination signal to the X.org display server. The result:

  1. The X server process stops immediately.
  2. Every graphical application that was running is killed—no save dialogs, no graceful shutdown.
  3. The display manager (LightDM on Ubuntu 11.10) detects that X has stopped and restarts it.
  4. You’re presented with the login screen.

This is not the same as logging out. Logging out sends proper close signals to applications, giving them a chance to save state. Ctrl+Alt+Backspace is an emergency kill switch for when the desktop is completely unresponsive.

When You’d Actually Need This

  • Desktop freeze: Compiz or Unity has crashed hard and even Ctrl+Alt+F1 (switch to a virtual terminal) isn’t responding quickly enough.
  • GPU driver lockup: A proprietary NVIDIA or ATI driver has hung, leaving the screen frozen or displaying artifacts.
  • Runaway fullscreen application: A game or application has seized the display and keyboard focus, and Alt+F4 and Alt+Tab are unresponsive.
  • Testing display configurations: When experimenting with xrandr or xorg.conf changes that produce an unusable display, a quick restart is faster than SSH-ing in or rebooting.

If you can still reach a terminal (Ctrl+Alt+F1), you have other options like sudo service lightdm restart. But Ctrl+Alt+Backspace works even when you can’t switch to a TTY.

Method 1: Keyboard Settings GUI

This is the simplest approach and requires no command-line work.

Step 1 — Open Keyboard Layout Settings

Open System Settings from the Unity launcher or the gear menu in the top-right panel. Navigate to Keyboard → Layouts.

Step 2 — Access Layout Options

Click the Options… button at the bottom of the Keyboard Layouts window.

Step 3 — Enable the Shortcut

Expand the section labelled Key sequence to kill the X server. Check the box next to Ctrl+Alt+Backspace.

Keyboard layout options showing Ctrl+Alt+Backspace toggle

Step 4 — Close and Test

Close the settings window. The change takes effect immediately—no restart required. Test it by pressing Ctrl+Alt+Backspace (save your work first!). You should be dropped to the LightDM login screen.

Method 2: setxkbmap Command

If you prefer the terminal or need to script this change, setxkbmap provides a one-liner.

Step 1 — Run the Command

Terminal

setxkbmap -option terminate:ctrl_alt_bksp

This enables the shortcut immediately for the current X session.

Step 2 — Make It Persistent

The setxkbmap command only applies to the current session. To run it automatically on every login, add it to your startup applications:

Terminal

mkdir -p ~/.config/autostart
cat > ~/.config/autostart/enable-zap.desktop << 'EOF'
[Desktop Entry]
Type=Application
Name=Enable Ctrl+Alt+Backspace
Exec=setxkbmap -option terminate:ctrl_alt_bksp
Hidden=false
NoDisplay=true
X-GNOME-Autostart-enabled=true
EOF

This creates a .desktop file that runs the command on each login.

Step 3 — Verify

Check the current xkb options:

Terminal

setxkbmap -query

The output should include terminate:ctrl_alt_bksp in the options line.

Method 3: Xorg Configuration File

This method applies the setting system-wide, for all users, at the X server level.

Step 1 — Create a Configuration Snippet

Terminal

sudo nano /etc/X11/xorg.conf.d/10-enable-zap.conf

If the directory doesn’t exist, create it first:

Terminal

sudo mkdir -p /etc/X11/xorg.conf.d/
sudo nano /etc/X11/xorg.conf.d/10-enable-zap.conf

Step 2 — Add the Configuration

Enter the following content:

Section "InputClass"
    Identifier "keyboard-zap"
    MatchIsKeyboard "on"
    Option "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection

Save with Ctrl+O and exit with Ctrl+X.

Step 3 — Restart X

For this method, you need to restart the X server for the configuration to be read. The easiest way is to log out and back in, or restart LightDM:

Terminal

sudo service lightdm restart

Warning: This will kill your current graphical session—exactly the same as Ctrl+Alt+Backspace would.

Xorg configuration file in nano editor

Step 4 — Verify

After logging back in, check the X server log for the applied option:

Terminal

grep -i "terminate" /var/log/Xorg.0.log

You should see a line indicating the terminate:ctrl_alt_bksp option was applied.

Which Method Should You Choose?

MethodScopePersistenceEase
GUI Keyboard SettingsCurrent userSurvives rebootsEasiest
setxkbmap + autostartCurrent userSurvives reboots (via autostart)Moderate
xorg.conf.d snippetAll usersSurvives rebootsRequires root

For a personal workstation, the GUI method is fine. For a shared machine or a headless setup you configure via SSH, the xorg.conf.d approach is more reliable.

Common Pitfalls

Accidentally pressing the shortcut. This is the very reason Ubuntu disabled it. Once enabled, Ctrl+Alt+Backspace kills everything instantly with zero warning. Build a habit of saving frequently, and consider whether you actually need this enabled long-term or just for a troubleshooting session.

Conflicting XkbOptions. If you set other XkbOptions (like custom Caps Lock behaviour), make sure to combine them. The setxkbmap -option command replaces all options by default. To append instead:

Terminal

setxkbmap -option "" -option terminate:ctrl_alt_bksp -option caps:escape

The empty -option "" clears existing options first, then the subsequent -option flags set them all at once.

xorg.conf overriding xorg.conf.d. If you have a full /etc/X11/xorg.conf file with its own InputClass section, it may override the snippet in xorg.conf.d/. In that case, add the Option "XkbOptions" "terminate:ctrl_alt_bksp" line directly to the existing keyboard InputClass in xorg.conf.

Doesn’t work in virtual terminals. Ctrl+Alt+Backspace only kills the X graphical server. If you’re on a TTY (Ctrl+Alt+F1 through F6), this shortcut has no effect. It’s purely an X.org feature.

Feature removed from Wayland. If you later upgrade to an Ubuntu version that defaults to Wayland (17.10+), this shortcut will not function. Wayland sessions use different compositor-level mechanisms. This guide applies specifically to X.org sessions.

Alternatives When the Desktop Freezes

Before reaching for the kill switch, try these in order:

  1. Ctrl+Alt+F1 — switch to a text terminal. Log in and run sudo service lightdm restart.
  2. Alt+SysRq+K — the Magic SysRq “SAK” key kills all processes on the current virtual terminal, including X.
  3. SSH from another machine — if networking still works, SSH in and restart the display manager remotely.
  4. Alt+SysRq+REISUB — the safe reboot sequence as an absolute last resort.

Final Thoughts

Ctrl+Alt+Backspace is a power-user tool. It’s there for the moments when everything else has failed and you need to get back to a working login screen without reaching for the power button. Enable it if you’re comfortable with the risk of accidental data loss, keep your work saved frequently, and know that it’s one of several recovery options available on Ubuntu 11.10.

Frequently Asked Questions

Why was Ctrl+Alt+Backspace disabled in Ubuntu?
It was disabled starting with Ubuntu 9.04 (Jaunty Jackalope) because users were accidentally pressing the combination and losing unsaved work. The X server terminates immediately without any confirmation prompt, killing all running graphical applications.
What exactly happens when Ctrl+Alt+Backspace is pressed?
The X server (Xorg) terminates immediately. All graphical applications are killed without saving. The display manager (LightDM or GDM) restarts and presents the login screen. Any unsaved work in graphical applications is lost.
Is this the same as logging out?
No. Logging out gracefully closes applications and allows them to prompt you to save work. Ctrl+Alt+Backspace kills the X server forcefully—no save prompts, no cleanup. It is a last resort for when the desktop is completely frozen.
Does this work with Wayland?
No. Ctrl+Alt+Backspace is an X.org feature. Ubuntu 11.10 used X.org exclusively, so it applies here. Wayland-based sessions (introduced later) use different mechanisms for recovering from display freezes.
Will this shortcut survive a system upgrade?
It depends on the method used. The keyboard settings GUI method may be reset during a major version upgrade. The xorg.conf method and setxkbmap approaches are more persistent, but major upgrades can overwrite configuration files. Verify after upgrading.