How to start/stop USB mouse/keyboard access

Hello,

I'm using KDE4 and FreeBSD 9.1 and I wanted to start/stop USB mouse and keyboard access on a running system by shell script. I tried stopping hald, dbus and restarting devfs to disable the mouse and keyboard but it's not working.

Is it possible to disable/enable the USB devices?

Thanks in advance.
 
Simply killing moused(8) will do the trick for mice. I am not so sure about keyboards though. There isn't really a daemon running for it.
 
The rules in /etc/devd.conf show how FreeBSD is attaching and detaching the USB keyboard and mouse - look for the entries for ukbd and ums. If you copy the actions on detach you should be able to disable access. I think they involve various incantations of moused and syscons.
 
Back
Top