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?
Asked
Active
Viewed 1,292 times
4
-
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
-
1I 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 'SO- stop being evil' May 11 '11 at 21:13
-
Does the kiosk-mode run under Xorg? ;) – plaes May 11 '11 at 21:55
1 Answers
5
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
plaes
- 610
- 5
- 9
-
1Also 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 06:58