| > I want a non data transferring power plug that can't be used to compromise my machine should a manufacturer opt to do that. At least in Linux you can disable automatic binding of kernel drivers to devices like so: echo 0 >/sys/bus/usb/drivers_autoprobe
You can plug in a keyboard and even though the device is recognized and listed in "lsusb", it's not used as a keyboard (or network device, soundcard, scanner, ...) # dmesg
[ 1017.031703] usb 1-10.4: new low-speed USB device number 8 using xhci_hcd
# lsusb -s 1:8
Bus 001 Device 008: ID 046d:c30e Logitech, Inc. UltraX Keyboard (Y-BL49)
I can type on this newly connected keyboard, but no key presses are recorded on the console or on X-windows. My other (also USB) keyboard that had been connected before is still working fine, though.This can even be done with a different mechanism on a per-bus basis as described in https://www.kernel.org/doc/Documentation/usb/authorization.t... If I decide to use the 2nd keyboard, I'll manually bind this device to the usb hid driver like so: # echo 1-10.4:1.0 > /sys/bus/usb/drivers/usbhid/bind
(the :1.0 comes from the different functions one single USB device may offer) And from this point on the keyboard works normally.I have no idea why no one bothered to make a nice gui for this feature (which also works on other busses), or why it's not standard to popup some message-box on other OSs (e.g. Windows) whenever something is plugged in a port, before even trying to load any drivers. (edit: added 2nd part where I manually bind) |
Getting off-topic, but this remark can be applied to most aspects of Linux OS's tbh. We developers are too comfortable with the shell on Linux, whereas with it being such a pain on Windows, the devs themselves are more inclined to write small GUIs left and write to solve their problems.