DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 28th December 2009
There0 There0 is offline
./dev/null
 
Join Date: Jul 2008
Posts: 170
Default Disable Ctrl+Alt+Backspace

Here goes another seemingly nubly question that i used to use frequently, how to stop control+alt+backspace from killing my X session?

Ii used to use the DontZap = true in my xorg.conf file back when and IIRC it worked the way i wanted, this is a personal choice and nothing to do with "security" or otherwise.

I spent some time googleing and such but came up with the same DontZap option, i am assuming that Xenocara does not support this? or is configured differently?Yes i have tried "True" and also "yes" and neither worked, i am assuming Xenocara is the difference?

Thx for your helpful comments on this.
__________________
The more you learn, the more you realize how little you know ....
Reply With Quote
  #2   (View Single Post)  
Old 29th December 2009
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,128
Default

Why would you want that to prevent from happening? That key combination was invented to backup out from X in emergency situations.

IMHO it is not easy to accidently press CNTRL+ALT+BACKSPACE
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #3   (View Single Post)  
Old 29th December 2009
There0 There0 is offline
./dev/null
 
Join Date: Jul 2008
Posts: 170
Default

Quote:
Why would you want that to prevent from happening?
There are MANY reasons for this (for me that is) one of which being that i CAN NOT always be at my (or work owned computers) laptop, there is need for me to be away (quickly) when the phone rings and otherwise.

There are over 2600 (140+ different businesses) people where i work, i DO NOT know all of them (or trust any of them), i can NOT lock the door to my desk (as i do not have one) and must leave many computers/equipment unattended, and of course my equipment (or data) is NOT COVERED by there insurance.

Although most of these 2600 ppl do not go near my desk (or through the front door of coorporate HQ), there is a cleaning crew at night as well that has been known to be less than honest.

Do not leave your equipment at work you say? well sometimes when your on call (we take 1 week at a time shifts) you HAVE to have your equipment with you at all times and HAVE to leave it quickly, even when your just visiting the sauna or gym.

Even though i do not have any company data on my computer i do use it to trouble shoot network related issues and much more. I could keep listing my reasons for wanting/requiring that my Xsession is not so easily screwed up and possibly losing work to boot.

Quote:
That key combination was invented to backup out from X in emergency situations.
I could in an "emergency" situation EASILY switch consoles and login and use the pkill command, IF i ever had the need for my robust as could be OpenBSD system to kill an X session.

Quote:
IMHO it is not easy to accidently press CNTRL+ALT+BACKSPACE
Perhaps a silly example but Ctrl+Alt+Del is approximatly less than 1 inch from the Backspace button, and even though i have my ThinkLight on when i am reading at night, it IS EASY to accidentaly hit the wrong button(s). Yes i know this behaviour (Ctrl+Alt+Backspace) is disabled by default in OpenBSD, but why explain a personal preference (or stubbly finger accidently hitting the wrong button). I personally prefer to have the option of Ctrl+Alt+Backspace NOT kill my X session, i am just at a loss on how to configure it.
__________________
The more you learn, the more you realize how little you know ....

Last edited by There0; 29th December 2009 at 09:00 PM.
Reply With Quote
  #4   (View Single Post)  
Old 29th December 2009
There0 There0 is offline
./dev/null
 
Join Date: Jul 2008
Posts: 170
Default

Almost forgot to mention another accidental (mis)use of Ctrl+Alt+Del. If anybody is familiar with VMWare products, you know what Ctrl+Alt+Insert is used to "remove" focus from the virtual machine (with a GUI install mind you).

Well just so happens that i have accidentally hit Delete instead (more than a few times), thus causeing the desktop in the VM and whatever i was working on to be killed, VMWare DOES try to prevent this by popping up a big message saying to use Ctrl+Alt+Insert instead, this does not always help ...

This may seem unimportant to most but there are ppl that use VM's daily to test and configure many things before deploying, and DO require the non use of Ctrl+Alt+Backspace, in virtual machines and raw metal installs as well.
__________________
The more you learn, the more you realize how little you know ....
Reply With Quote
  #5   (View Single Post)  
Old 29th December 2009
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,128
Default

You could ask on the misc mailing list, why "DontZap" doesn't work anymore.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #6   (View Single Post)  
Old 29th December 2009
There0 There0 is offline
./dev/null
 
Join Date: Jul 2008
Posts: 170
Default

Will do (later tonight), was hoping it was just a syntax thing, thx.
__________________
The more you learn, the more you realize how little you know ....
Reply With Quote
  #7   (View Single Post)  
Old 31st December 2009
There0 There0 is offline
./dev/null
 
Join Date: Jul 2008
Posts: 170
Default

After conferring with J.C. Roberts, he suggested the following (which worked) to disable the ctrl+alt+backspace from killing X, I did ask him how to remap it to default in case anybody wanted it back to "normal" and will post it when i get a response.

Quote:
Find where your backspace key is mapped since also used to terminate the
X server. (note long line is wrapped in this mail)

$ xmodmap -pke | grep -i backspace
keycode 22 = BackSpace Terminate_Server BackSpace Terminate_Server BackSpace Terminate_Server
$

And remap it to just being backspace.
$ xmodmap -e "keycode 22=BackSpace"

Note capitalization is important!

Though the above is the default for a very typical/classic keyboard
(IBM Model-M) with default 'us' mappings, you might have something
different.

--
J.C. Roberts
I would like to thank him once again for being prompt and helpful.
__________________
The more you learn, the more you realize how little you know ....
Reply With Quote
  #8   (View Single Post)  
Old 31st December 2009
There0 There0 is offline
./dev/null
 
Join Date: Jul 2008
Posts: 170
Default

To return keycode to default mapping use the following command

Quote:
$ xmodmap -e "keycode 22=BackSpace Terminate_Server BackSpace Terminate_Server BackSpace Terminate_Server"
__________________
The more you learn, the more you realize how little you know ....
Reply With Quote
  #9   (View Single Post)  
Old 1st January 2010
There0 There0 is offline
./dev/null
 
Join Date: Jul 2008
Posts: 170
Default

Interesting information that followed this topic, apperently a couple of different ways to do this and some info concerning DontZap option at the following hyperlink.

http://marc.info/?l=openbsd-misc&m=126229246930230&w=2
__________________
The more you learn, the more you realize how little you know ....
Reply With Quote
Old 1st January 2010
There0 There0 is offline
./dev/null
 
Join Date: Jul 2008
Posts: 170
Default

FTR, after this discussion with some interesting persons I have decided that 2 of the stated options could help me out considerably, the following;

If or when i require a system wide disable of DontZap the following syntax inserted into my /etc/X11/xorg.conf file does the trick (for now) notice NO yes or true option, as stated by Matthieu Herrb. It was a syntax error after all, but this lead me to discover other ways/information which i am grateful to J.C. Roberts for.

Section "ServerFlags"
Option "DontZap"
Endsection

If or when i require a user specific disable or DontZap i use the following lines in the local user .xinitrc file;

#!/bin/sh
### To turn Zap *OFF*:
/usr/X11R6/bin/xmodmap -e "keycode 22 = BackSpace BackSpace BackSpace BackSpace BackSpace BackSpace"

### To turn Zap *ON*:
#/usr/X11R6/bin/xmodmap -e "keycode 22 = BackSpace Terminate_Server BackSpace Terminate_Server BackSpace Terminate_Server"
/usr/local/bin/startkde

Just need to remember to type startx instead of startkde (note to self)
__________________
The more you learn, the more you realize how little you know ....
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
HOWTO: xorg/x11 without hald/dbus and with CTRL-ALT-BACKSPACE working vermaden Guides 16 27th March 2010 09:17 PM
Disable CTRL+ALT+DEL FreeBSD Gnome mfaridi FreeBSD Security 7 27th August 2008 07:10 PM
Ctrl-D and Ctrl-C sometimes dose not work mfaridi FreeBSD General 9 6th July 2008 07:04 AM
disabling ctrl-c malindang FreeBSD General 3 27th June 2008 12:06 AM
Backspace Annoyance schrodinger FreeBSD General 2 3rd June 2008 12:11 PM


All times are GMT. The time now is 11:33 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick