LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 07-03-2003, 10:06 AM   #1
Paulo Ges
Member
 
Registered: Feb 2003
Location: Rio de Janeiro - Brazil
Distribution: Slackware 11
Posts: 30

Rep: Reputation: 15
Inhibiting the usage of some keys when running an application under KDE


I need to inhibit the usage of some key combinations like CTRL+ALT+BACKSPACE, CTRL+ALT+F1...Fn, etc during an application under KDE. Doing so I want to prevent final users from attempting to shut down X. How can I do that? Does Linux have any native resources in order to implement this protection?

Thanks in advance
Paulo Ges
 
Old 07-03-2003, 03:50 PM   #2
mrtwice
Member
 
Registered: Feb 2002
Distribution: xubuntu 8.10
Posts: 225

Rep: Reputation: 31
From XF86Config:

Quote:
# Uncomment this to disable the <Crtl><Alt><Fn> VT switch sequence
# (where n is 1 through 12). This allows clients to receive these key
# events.

# Option "DontVTSwitch"

# Uncomment this to disable the <Crtl><Alt><BS> server abort sequence
# This allows clients to receive this key event.

# Option "DontZap"
 
Old 07-03-2003, 05:30 PM   #3
Paulo Ges
Member
 
Registered: Feb 2003
Location: Rio de Janeiro - Brazil
Distribution: Slackware 11
Posts: 30

Original Poster
Rep: Reputation: 15
mrtwice, thanks for your help, but I think I'm still doing something wrong. The following is my /etc/X11/XF86Config-4 file (Conectiva 8 distro). Although I've changed it according to your suggestions, when CTRL+ALT+BACKSPACE or, for instance, CTRL+ALT+F1 keys are pressed, X is shutdown. Can you give me some tips where is my mistake?

Thanks
Paulo Ges

section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
EndSection

Section "Files"
FontPath "/usr/X11R6/lib/X11/fonts/misc:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi:unscaled"
FontPath "/usr/X11R6/lib/X11/fonts/Type1/"
FontPath "/usr/X11R6/lib/X11/fonts/CID/"
FontPath "/usr/X11R6/lib/X11/fonts/Speedo/"
FontPath "/usr/X11R6/lib/X11/fonts/misc/"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"
FontPath "/usr/X11R6/lib/X11/fonts/TTF"
FontPath "//usr/share/fonts/default/Type1"
EndSection

Section "Module"
Load "extmod"
Load "glx"
Load "dri"
Load "dbe"
Load "record"
Load "freetype"
Load "type1"
EndSection

Section "InputDevice"
Identifier "Keyboard0"
Driver "keyboard"
Option "XkbModel" "pc105"
Option "XkbLayout" "us_intl"
Option "DontVTSwitch" "1"
Option "DontZap"
EndSection

Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "Microsoft"
Option "Device" "/dev/ttyS0"
Option "Emulate3Buttons"
Option "Emulate3Timeout" "50"
EndSection

Section "Monitor"
Identifier "Monitor0"
VendorName "Generic"
ModelName "Generic Super VGA, 800x600 @ 56 Hz"
HorizSync 31.5 - 35.1
VertRefresh 50.0 - 61.0
EndSection

Section "Device"
Identifier "Card0"
Driver "vesa"
Option "lcd_center"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
DefaultDepth 16
SubSection "Display"
Depth 4
Modes "640x480"
EndSubSection
SubSection "Display"
Depth 8
Modes "640x480"
EndSubSection
SubSection "Display"
Depth 15
Modes "640x480"
EndSubSection
SubSection "Display"
Depth 16
Modes "800x600"
EndSubSection
SubSection "Display"
Depth 24
Modes "640x480"
EndSubSection
EndSection

Section "DRI"
EndSection
 
Old 07-03-2003, 07:38 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,310
Blog Entries: 54

Rep: Reputation: 2860Reputation: 2860Reputation: 2860Reputation: 2860Reputation: 2860Reputation: 2860Reputation: 2860Reputation: 2860Reputation: 2860Reputation: 2860Reputation: 2860
AFAIK isn't a KDE-specific but a general issue. If you want to get rid of function keys at the console and under XFree, I think you need to modify the keymaps. Have a look at the The Linux keyboard and console HOWTO Examples of use of loadkeys and xmodmap. While you're at TLDP you may want to check out the Kiosk HOWTO as well.
 
Old 07-03-2003, 10:58 PM   #5
mrtwice
Member
 
Registered: Feb 2002
Distribution: xubuntu 8.10
Posts: 225

Rep: Reputation: 31
Quote:
AFAIK isn't a KDE-specific but a general issue. If you want to get rid of function keys at the console and under XFree, I think you need to modify the keymaps. Have a look at the The Linux keyboard and console HOWTO Examples of use of loadkeys and xmodmap. While you're at TLDP you may want to check out the Kiosk HOWTO as well.
I don't know about this, but I do know that its not a key map issue.

what I told you is correct, you just didn't put that stuff in the right section.

it needs to be in

section "ServerFlags"

not in

section "inputDevice"

which is where you have it now. Here is part of my config file:

# **********************************************************************
# Server flags section.
# **********************************************************************

Section "ServerFlags"

# Uncomment this to cause a core dump at the spot where a signal is
# received. This may leave the console in an unusable state, but may
# provide a better stack trace in the core dump to aid in debugging

# Option "NoTrapSignals"

# Uncomment this to disable the <Crtl><Alt><Fn> VT switch sequence
# (where n is 1 through 12). This allows clients to receive these key
# events.

# Option "DontVTSwitch"

# Uncomment this to disable the <Crtl><Alt><BS> server abort sequence
# This allows clients to receive this key event.

# Option "DontZap"

# Uncomment this to disable the <Crtl><Alt><KP_+>/<KP_-> mode switching
# sequences. This allows clients to receive these key events.

# Option "DontZoom"

[...]

EndSection
 
Old 07-04-2003, 09:20 AM   #6
Paulo Ges
Member
 
Registered: Feb 2003
Location: Rio de Janeiro - Brazil
Distribution: Slackware 11
Posts: 30

Original Poster
Rep: Reputation: 15
I proceed according to your suggestions, but the situation remains the same. Can it be a distro-specific matter?

Thanks
Paulo

Section "ServerFlags"
Option "DontZap"
Option "DontVTSwitch"
EndSection

Section "InputDevice"
Identifier "Keyboard0"
Driver "keyboard"
Option "XkbModel" "pc105"
Option "XkbLayout" "us_intl"
EndSection
 
Old 07-05-2003, 09:55 PM   #7
mrtwice
Member
 
Registered: Feb 2002
Distribution: xubuntu 8.10
Posts: 225

Rep: Reputation: 31
I really don't hink it is distro specific, but I am not a guru enough to tell you for certain. The only thing I can think of is to make sure that your XF86Config file is what is actually being read by the server. I know in some distros there is a XF86Config-4 file that holds the X11 server's configuration.

You might try reading the man page for XF86Config

man XF86Config

I am not sure what else to tell you. Let me know if you can't get it to work and I will see if I can get it to work on my machine.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Any application that monitors usage time just like in cyber cafe? Niceman2005 Linux - Software 0 10-27-2005 08:44 AM
Small fonts in Gnome application when running KDE Artik Debian 16 05-29-2005 11:25 AM
how to determine cpu usage, memory usage, I/O usage by a particular user logged on li rags2k Programming 4 08-21-2004 04:45 AM
Running automaticly an application when start up KDE Paulo Ges Linux - Newbie 1 03-17-2003 10:15 AM
running an application JSP Linux - General 0 03-12-2002 10:44 PM


All times are GMT -5. The time now is 09:29 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration