From: John Magolske on
I'd like to be able to use Ctrl-Alt-BS to kill X, but can't get it to
work. I searched around and tried a bunch of things:

In /etc/X11/xorg.conf :
...
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
Option "XkbOptions" "compose:rwin"
Option "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection
...
Section "ServerFlags"
Option "DontZap" "off"
EndSection

Added to /etc/default/console-setup (then rebooted the machine):

XKBOPTIONS="terminate:ctrl_alt_bksp"

Added this line to /etc/default/keyboard :

XKBOPTIONS="terminate:ctrl_alt_bksp"

Added this line to ~/.xsession and ~/.xinitrc :

setxkbmap -option terminate:ctrl_alt_bksp

....

All to no avail. The *only* way I can get Ctrl-Alt-BS to Zap X is to
first open a terminal after launching X and manually enter:

setxkbmap -option terminate:ctrl_alt_bksp

Isn't this supposed to happen automatically when launching X if that
line is in ~/.xinitrc ?

And Alt-SysRq-K is not what I'm looking for -- that will kill X, but
just leaves a dead VT that I can't switch out of.

This is on sid, with the latest xserver-xorg-core.

TIA for any help,

John


--
John Magolske
http://B79.net/contact


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/20100306220556.GA6144(a)s70206.gridserver.com
From: John Magolske on
* John Magolske <listmail(a)b79.net> [100306 14:07]:
> I'd like to be able to use Ctrl-Alt-BS to kill X, but can't get it to
> work. I searched around and tried a bunch of things:
> [ ... bunch of things ... ]

Finally found something that works, this line in ~/.xmodmap :

keycode 22 = BackSpace Terminate_Server

Now Ctrl-Alt-BS will Zap X. And it is this alone that does it -- I
undid all the other afore-mentioned bunch of things.

Not sure I entirely understand the above keycode command ... I would
think it means 'Shift-BS', but 'Shift-BS' has no effect. I got the
clue from http://bbs.archlinux.org/viewtopic.php?pid=602885#p602885
which suggested:

keycode 22 = BackSpace BackSpace Terminate_Server

But that has no effect, had to remove one 'BackSpace' from that line.

In any case, setting 'Zap' in xmodmap with 'Terminate_Server' seems to
make more sense, as it allows the user to set a key combo that suits
them best (ie, least likely to be hit by accident).

John


--
John Magolske
http://B79.net/contact


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/20100306232258.GA18206(a)s70206.gridserver.com
From: John Magolske on
> > I'd like to be able to use Ctrl-Alt-BS to kill X, but can't get it
>
> Finally found something that works, this line in ~/.xmodmap :
>
> keycode 22 = BackSpace Terminate_Server

Actually, what was preventing the Ctrl-Alt-BS key combo from working
was a line in my ~/.xmodmap that I'd forgotten about:

keycode 22 = BackSpace Prior

Which I commented out when trying the keycode mentioned in my previous
post. It was the commenting out of this line that allowed Ctrl-Alt-BS
to effectively Zap X ... What I've finally arrived at, to remap Zap to
something else is as follows:

in ~/.xmodmap :

! Make Control_R the Mode_switch key
add mod2 = Mode_switch
keycode 105 = Mode_switch
! make Shift-Control_R-Delete Zap X
keycode 119 = Delete Delete Delete Terminate_Server

Then, in /etc/X11/xorg.conf set "DontZap" to "off" :

Section "ServerFlags"
Option "DontZap" "off" #disable <Crtl><Alt><BS> (server abort)
EndSection

Or just comment out the above. Or leave it out entirely, but do not
set it to "on".

Now X will be Zapped by pressing Shift-Control_R-Delete, a somewhat
more unlikely key-press combo (for me anyways).

BTW, I found this guide to be very helpful in understanding xmodmap:

Some hints about xmodmap(1) and the X11 keyboard model
http://www.in-ulm.de/~mascheck/X11/xmodmap.html

Regards,

John


--
John Magolske
http://B79.net/contact


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/20100307011533.GB18206(a)s70206.gridserver.com