Linux: HowTo disable Ctrl-Alt-Backspace & Shift-Backspace

Robor

Elite Member
Oct 9, 1999
16,979
0
76
I'm typing on my new laptop and not quite comfortable with the keys. I type pretty fast but I make errors so I frequently backspace. As a result, I've killed my GDM 3 times today by accidentally having ctrl & alt held down when I backspaced to correct my error. It will not happen again. Here's how to 'fix' this situation...

To disable Ctrl-Alt-Backspace:

From UbuntuForums.org: http://ubuntuforums.org/showthread.php?t=146590

Open xorg.conf for editing (sudo gedit /etc/X11/xorg.conf). Add these 3 lines to the end:

Section "Serverflags"
Option "DontZap" "yes"
EndSection


Save the file and close gedit.

To disable Shift-Backspace (info from here):

Add this command (the entire underlined portion) to your startup programs: xmodmap -e "keycode 22 = BackSpace BackSpace Terminate_Server" or add that command to the end of your ~/.bashrc file. In either case, reboot your machine after you make the changes.

I did both of these 'fixes' and they work like a charm. I guess now I'll have to restart GDM from the command line. No biggie. Beats closing out my system several times per day. If anyone has a better idea, like how to map the GDM restart to say 'ctrl-alt-tilde' or something I can't fat-finger, I'm all ears! :)
 

Slackware

Banned
Jan 5, 2007
365
0
0
Originally posted by: Robor
I'm typing on my new laptop and not quite comfortable with the keys. I type pretty fast but I make errors so I frequently backspace. As a result, I've killed my GDM 3 times today by accidentally having ctrl & alt held down when I backspaced to correct my error. It will not happen again. Here's how to 'fix' this situation...

From UbuntuForums.org: http://ubuntuforums.org/showthread.php?t=146590

Open xorg.conf for editing (sudo gedit /etc/X11/xorg.conf). Add these 3 lines to the end:

Section "Serverflags"
Option "DontZap" "yes"
EndSection


Save the file and close gedit


I just did that and it works like a charm. I guess now I'll have to restart GDM from the command line. No biggie. Beats closing out my system several times per day. If anyone has a better idea, like how to map the GDM restart to say 'ctrl-alt-tilde' or something I can fat-finger, I'm all ears! :)

Why not install a key scheme that you are comfortable and have in rc.local insted?

I never remenber ctrl-alt-bksps anyway, i alway do the bsd way instead, mostly because that works.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
I never remenber ctrl-alt-bksps anyway, i alway do the bsd way instead, mostly because that works.

X is the same on BSD so ctrl+alt+bksp works, so what is the BSD way you're talking about?
 

Slackware

Banned
Jan 5, 2007
365
0
0
Originally posted by: Nothinman
I never remenber ctrl-alt-bksps anyway, i alway do the bsd way instead, mostly because that works.

X is the same on BSD so ctrl+alt+bksp works, so what is the BSD way you're talking about?

About key mappings, and yes they are diferent, i do realize that you are going to go around every thread from now on and ask dumb questions so i will just ignore you from now on.

Ok with you? Not that it really matters to me.
 

Slackware

Banned
Jan 5, 2007
365
0
0
Oh, and since you don't seem to understand, that is in every BSD, the keymap is alike but different.

Maybe you just didn't type with a keybord in *BSD, ever?
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
I love how ubuntu tutorials include instructions on how to open and close graphical editors. Instead of sending people who don't even know how to edit a file as root into their own xorg.confs, they should take the plunge and create a gui tool that can handle everything one might want to edit. Or not, I dunno...
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Originally posted by: Slackware
Oh, and since you don't seem to understand, that is in every BSD, the keymap is alike but different.

Maybe you just didn't type with a keybord in *BSD, ever?
/me fires up X on openbsd
/me hits ctrl-alt-bksp
/X dies

Not sure what you're talking about exactly.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
About key mappings, and yes they are diferent, i do realize that you are going to go around every thread from now on and ask dumb questions so i will just ignore you from now on.

If you consider the question dumb that's fine, but it was a valid question.

Oh, and since you don't seem to understand, that is in every BSD, the keymap is alike but different.

Maybe you just didn't type with a keybord in *BSD, ever?

Right, I guess I didn't run an OpenBSD firewall for myself about two years ago then. And no, it didn't have X on it but all of the keys were exactly the same as they are on Linux.

I love how ubuntu tutorials include instructions on how to open and close graphical editors. Instead of sending people who don't even know how to edit a file as root into their own xorg.confs, they should take the plunge and create a gui tool that can handle everything one might want to edit. Or not, I dunno...

The problem with that is that every config file has different syntax so they'd have to write parsers for virutally every file. I have no doubts that they'll eventually do the major ones, but you'll still need a text editor for most I would guess.
 

screw3d

Diamond Member
Nov 6, 2001
6,906
1
76
I've had this problem before. Can we somehow make X throw a yes/no dialog somewhere before killing X?
 

Sunner

Elite Member
Oct 9, 1999
11,641
0
76
Originally posted by: screw3d
I've had this problem before. Can we somehow make X throw a yes/no dialog somewhere before killing X?

Not when you Zap it.
It just TERM's the X server.

Oh and Slackware, this key combo doesn't come with the OS, it's a feature of X.org/XFree and will work just fine on Linux, BSD, Solaris, or whatever you prefer to run Xorg on.
 

Robor

Elite Member
Oct 9, 1999
16,979
0
76
Originally posted by: Slackware
Originally posted by: Nothinman
I never remenber ctrl-alt-bksps anyway, i alway do the bsd way instead, mostly because that works.

X is the same on BSD so ctrl+alt+bksp works, so what is the BSD way you're talking about?

About key mappings, and yes they are diferent, i do realize that you are going to go around every thread from now on and ask dumb questions so i will just ignore you from now on.

Ok with you? Not that it really matters to me.

WTF...??? You do realize that you (209 posts and a 1/5/07 join date) are talking to Nothinman? He's one of the most respected and helpful members of this forum and has been for some time (nearly 18K posts and a join date of 9/14/01).
 

Sunner

Elite Member
Oct 9, 1999
11,641
0
76
Originally posted by: Robor
Originally posted by: Slackware
Originally posted by: Nothinman
I never remenber ctrl-alt-bksps anyway, i alway do the bsd way instead, mostly because that works.

X is the same on BSD so ctrl+alt+bksp works, so what is the BSD way you're talking about?

About key mappings, and yes they are diferent, i do realize that you are going to go around every thread from now on and ask dumb questions so i will just ignore you from now on.

Ok with you? Not that it really matters to me.

WTF...??? You do realize that you (209 posts and a 1/5/07 join date) are talking to Nothinman? He's one of the most respected and helpful members of this forum and has been for some time (nearly 18K posts and a join date of 9/14/01).

Not to mention, he's the resident grumpy guy in OS ;)
 

CTho9305

Elite Member
Jul 26, 2000
9,214
1
81
Originally posted by: Nothinman
About key mappings, and yes they are diferent, i do realize that you are going to go around every thread from now on and ask dumb questions so i will just ignore you from now on.

If you consider the question dumb that's fine, but it was a valid question.

Oh, and since you don't seem to understand, that is in every BSD, the keymap is alike but different.

Maybe you just didn't type with a keybord in *BSD, ever?

Right, I guess I didn't run an OpenBSD firewall for myself about two years ago then. And no, it didn't have X on it but all of the keys were exactly the same as they are on Linux.

I love how ubuntu tutorials include instructions on how to open and close graphical editors. Instead of sending people who don't even know how to edit a file as root into their own xorg.confs, they should take the plunge and create a gui tool that can handle everything one might want to edit. Or not, I dunno...

The problem with that is that every config file has different syntax so they'd have to write parsers for virutally every file. I have no doubts that they'll eventually do the major ones, but you'll still need a text editor for most I would guess.

Then they should start patching apps to make them unified ;)

Originally posted by: Sunner
Originally posted by: screw3d
I've had this problem before. Can we somehow make X throw a yes/no dialog somewhere before killing X?

Not when you Zap it.
It just TERM's the X server.

Oh and Slackware, this key combo doesn't come with the OS, it's a feature of X.org/XFree and will work just fine on Linux, BSD, Solaris, or whatever you prefer to run Xorg on.

ctrl+alt+bksp is the "oh crap" escape - usually when you want to use it, something is very broken (e.g. the keyboard focus is locked somewhere and the mouse doesn't work), so you wouldn't be able to hit the confirmation dialog.

Originally posted by: Sunner
Originally posted by: Robor
Originally posted by: Slackware
Originally posted by: Nothinman
I never remenber ctrl-alt-bksps anyway, i alway do the bsd way instead, mostly because that works.

X is the same on BSD so ctrl+alt+bksp works, so what is the BSD way you're talking about?

About key mappings, and yes they are diferent, i do realize that you are going to go around every thread from now on and ask dumb questions so i will just ignore you from now on.

Ok with you? Not that it really matters to me.

WTF...??? You do realize that you (209 posts and a 1/5/07 join date) are talking to Nothinman? He's one of the most respected and helpful members of this forum and has been for some time (nearly 18K posts and a join date of 9/14/01).

Not to mention, he's the resident grumpy guy in OS ;)

It was a valid question - I still don't understand what Slackware is saying is different.
 

Sunner

Elite Member
Oct 9, 1999
11,641
0
76
Originally posted by: CTho9305
Then they should start patching apps to make them unified ;)

Someone started a project once to get kind of a Windows registry like thing in Linux, where all the system configuration would be stored.
Don't know if it's still active, or if they realized how utterly stupid that would be.

Besides, there are GUI's for most anything these days.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Non-X keyboard mapping is probably different in *BSD than in Linux, but inside of X11 it should be about the same (or at least the "X way of doing it" should be available on both). I did use bits of Linux information to get a slightly better keymap on my iBook (running OpenBSD before the hard drive crash).

<-Former resident OS grumpy guy.
 

Sunner

Elite Member
Oct 9, 1999
11,641
0
76
Originally posted by: n0cmonkey
Non-X keyboard mapping is probably different in *BSD than in Linux, but inside of X11 it should be about the same (or at least the "X way of doing it" should be available on both). I did use bits of Linux information to get a slightly better keymap on my iBook (running OpenBSD before the hard drive crash).

<-Former resident OS grumpy guy.

Nah, even in your grumpier days you still threw in a smiley now and then ;)
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: Sunner
Originally posted by: n0cmonkey
Non-X keyboard mapping is probably different in *BSD than in Linux, but inside of X11 it should be about the same (or at least the "X way of doing it" should be available on both). I did use bits of Linux information to get a slightly better keymap on my iBook (running OpenBSD before the hard drive crash).

<-Former resident OS grumpy guy.

Nah, even in your grumpier days you still threw in a smiley now and then ;)

The smilies were necessary, they would tell me things.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Not to mention, he's the resident grumpy guy in OS

Grumpy? Hmph, I never thought of myself like that, I just considered myself pedtantic. =)

Then they should start patching apps to make them unified

No one would be able to decide on a syntax and if they did we'd probably end up with something bad like XML anyway...
 

Sunner

Elite Member
Oct 9, 1999
11,641
0
76
Well, bsobel used to be the grumpy guy, but he's kinda lightened up, so you sorta won the title by default ;)
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Ah, so I was the runner up that got the crown because the previous queen failed in his/her duties, how nice =)
 

Brazen

Diamond Member
Jul 14, 2000
4,259
0
0
Originally posted by: Slackware
Originally posted by: Nothinman
I never remenber ctrl-alt-bksps anyway, i alway do the bsd way instead, mostly because that works.

X is the same on BSD so ctrl+alt+bksp works, so what is the BSD way you're talking about?

About key mappings, and yes they are diferent, i do realize that you are going to go around every thread from now on and ask dumb questions so i will just ignore you from now on.

Ok with you? Not that it really matters to me.

You are really trying to dig yourself into a hole here fast, aren't you.
 

Brazen

Diamond Member
Jul 14, 2000
4,259
0
0
Originally posted by: Nothinman
Not to mention, he's the resident grumpy guy in OS

Grumpy? Hmph, I never thought of myself like that, I just considered myself pedtantic. =)

Yeah, which is why it cracks me up so much when you mess up little things yourself :laugh:
 

Brazen

Diamond Member
Jul 14, 2000
4,259
0
0
Originally posted by: CTho9305

It was a valid question - I still don't understand what Slackware is saying is different.

I'm still wondering the same thing.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
It was a valid question - I still don't understand what Slackware is saying is different.

Because he thinks I've got some personal vendetta against him.

Yeah, which is why it cracks me up so much when you mess up little things yourself

Well I can usually attribute those to alcohol to typing too fast =)