Tuesday, April 7, 2009

Zapping the server

Some amount of bad blood was spilled last week (read LWN's writeup for a better summary than I'll provide here).

In short, zapping through Control-Alt-Backspace was disabled and some people are not happy. It is a useful combination and I (need to) use it regularly. Should it be enabled by default? No.

Let's think about this: Assume that the server never supported zapping in the past. Now we add a feature that immediately and without asking terminates your session, shuts down all applications, logs you out, brings down your wireless network in the process, shuts down your VPN and generally makes the computer giggle at you. Of course, we documented this shortcut in the Xorg man page.

I guess we would see the same flame-wars. Potentially even by the same people.

The correct thing to do for a UI feature like this - like with any UI feature - is to consider who will benefit from such a change and make it accessible to those. Experienced users will benefit from zapping. So make it accessible to them. Those who want to use the computer but not have to know about it's internals should not be able to accidentally trigger it. Not the other way round.

Anyway. The correct solution was rather easy, and thankfully, Julien Cristau has written the patch for xkeyboard-config and there's a patch for the X server too. Which, amongst from other things, shows that time spent reading and replying to flame-wars is spent less usefully as time spent writing patches.

The following command enables server zapping.

setxkbmap -option "terminate:ctrl_alt_bksp"

I'll leave it as an exercise to the reader to figure out how to click the matching checkbox in the keyboard configuration tools.

So for the future: If you are unhappy with a particular change, take the issue to the appropriate mailing list and/or persons, in polite tone and based on real arguments (made-up facts only count when you're on TV) and it may just get fixed. It's pretty much a no-brainer, but maybe even such a minimum requirement is too high. In the end, Julien's patch was the reason why the whole issue got sorted out, not the flame-wars.

Rawhide users:
There's a dependency chain in keyboard configuration that made me weep inside a little. Update to fedora-setup-keyboard-0.3-4, xkeyboard-config-1.5-5 and xorg-x11-server-1.6.0-18, then restart HAL and restart X. Zapping will work on a plain X server and in gdm, but only if enabled in the gnome session.

[update]
Option DontZap is restored with this change to it's previous functionality - it disables zapping altogether (if enabled). Even if DontZap is disabled (the default), zapping only works if it is present in the xkb map.

3 comments:

Marius Gedminas said...

Background (so you don't get defensive ;): I completely support disabling C-A-B by default.

Question: does Option "DontZap" "false" still work?

I have to admit that I'm a bit fuzzy how the xkb layout gets chosen at the GDM screen, and I doubt a checkbox in my user preferences would affect it.

patrick2901 said...

VERY WRONG: These are no flame wars - this is quality assurance!!!

You don't have to look about unexperienced users if experienced users would get any disadvantages! In the past some unexperienced users accidently killed their running tasks - that was not good, but it was their own fault and it is indeed better than handicapping experienced users. So the current situation is a regress and it is the way M$ Windows is developed - only to look about the weakest and the dumbest. So if you want to make anything better, you must think before and then consider a solution that is really an improvement for all or almost all possible users.

sarbash.s said...

Yes, it does. I don't know about preferences in GUI because I prefer use console & mc for such tasks...