I'm looking for a method to lock/disable keyboard input into a text console (tty, no xorg) without blanking the screen. I would like to be able to monitor the on-screen progress of a long-running program (Partclone) without worrying about tampering at the keyboard (Ctrl-C, switching terminals, etc).
I'm aware of vlock
, but it blanks the screen.
Best Answer
This question really intrigued me, seemed like a simple request but was tricky to find options beyond the typical
xlock
,vlock
andxset
options.However I believe I've found 2 methods to do this.
Method #1 - cat /dev/...
The first method basically consumes /dev/tty0 so nothing else can get through.
Method #2 - disable usbhid module
The second method involves unloading the usbhid kernel module. This will only work if you have a USB keyboard.
Method #3 - grub
You can disable all USB devices using the
nousb
parameter to the kernel via Grub.