I'm running Ubuntu Server (16.04.3 LTS) with X, Openbox and Chromium in kioskmode on a touchscreen device. It is starting up as a (non-root) user straight into the kiosk.
There is no need for a mouse or keyboard, so I'm starting X with
startx -- -nocursor
what effectively disables the mouse. But the user still can plug in a keyboard and do all sorts of unwanted things with Chromium. So I'm looking for ways to disable the entire keyboard.
To catch and disable every single key and key combination in Openbox rc.xml seems an impossible task to me. So is there some switch with startx or Openbox to disable the keyboard? (I've tried -nokeyboard but it gives an error. Also -keyboard null doesn't work.)
Or, as a last resort, is there a way to disable keyboard (and mouse) at user login?
xinputis your tool.Find id of your keyboard with
xinput --list. Possible output:Get id of
AT Translated ... keyboard. In this case it is10. Disable keyboard input with:As one-liner:
(You can do the same with mouse or touchpad, just use matching id).
P.S.: I am not sure if the keyboard entry is visible as long as no keyboard is plugged in, or if an additional one appears after plugging one in. I have no hardware to check that right now. Maybe you have to create an
udevrule that watches for new keyboards and runsxinput --disable [...].