Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I would like to block the keyboard for a kiosk-based application implemented on Linux. The keyboard could be blocked with "nohup cat /dev/tty0" on some Linux distributions, but it's not working on Debian. How can I resolve this?

share|improve this question
    
I rewrote your question with better English. I think it makes more sense now, but please check and make sure I didn't actually break it :) Also you don't have to include greetings or thanks in your question. You do that by voting and participating here. –  Caleb May 11 '11 at 18:30
1  
I think cat /dev/tty0 only worked back when input devices could only be opened by one program at a time. I'd go for either disabling the keyboard through xorg.conf, or unbinding every key with xmodmap or xkb. It may take more than that to prevent the user from changing the mapping table or plugging in a keyboard and triggering an automatic driver load. –  Gilles May 11 '11 at 21:13
    
Does the kiosk-mode run under Xorg? ;) –  plaes May 11 '11 at 21:55

1 Answer 1

up vote 5 down vote accepted

Firstly set following option to disable hotplugging in xorg.conf or xorg.conf.d/misc.conf:

Section "ServerFlags"
    Option "DisableModInDev" "True"
EndSection

Then disable all keyboards:

Section "InputClass"
    MatchIsKeyboard       "True"
    Option "Ignore"       "True"
EndSection
share|improve this answer
    
Also make sure that the "Magic SysRQ keys" option in the kernel config is set to OFF -- in debian stock kernels it defaults to 'on' because it's such an incredibly handy emergency measure, but it's something you most likely don't want kiosk users to have access to... –  Shadur May 12 '11 at 6:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.