-   Slackware (
-   -   rc mouse and keyboard (

Ipolit 02-10-2005 02:40 PM

rc mouse and keyboard
Can you give me an advice
How could I disable the mouse and the keyboard in the console after the system is loaded? With an rc script, automatically
I will not use X.

keefaz 02-10-2005 03:02 PM

First you will need gpm package after install it, chmod +x /etc/rc.d/rc.gpm and
/etc/rc.d/rc.gpm start

If you have problem after that try :

Ipolit 02-10-2005 03:06 PM

I mean disable
I don't want'em to work

keefaz 02-10-2005 03:12 PM

Sorry my bad for reading wrong ;)

Just chmod -x /etc/rc.d/rc.gpm should suffice,
maybe do a /etc/rc.d/rc.gpm stop before

But why do you want disable the keyboard ?

Phathead 02-10-2005 03:25 PM

A few ideas:

Slackware will boot without a keyboard attached. Have you tried just unplugging the keyboard and mouse? It sounds like you don't need them at all, so why not unplug them?

If you have a USB keyboard and mouse, you can remove the kernel modules for them. I don't remember the names off hand, but if you do 'lsmod' you'll see what modules are running. You can either blacklist those modules in /etc/hotplug/blacklist or put some rmmod commands in your /etc/rc.d/rc.local. Blacklisting is more permanent because if you run rmmod, the modules will be re-inserted by unplugging and replugging the keyboard or mouse.

What is the goal of this? I'm assuming physical security is a problem and you'd prefer that no one be able to even try to log in. If so, make sure you edit your /etc/lilo.conf file to add a line that says restricted and another that says password="" Combined in the global section of lilo.conf, you will be prompted for a password when you run lilo. This password will restrict entering boot options at the lilo prompt to those who know the password. Check 'man lilo.conf' for details. Without this, your computer can be compromised by power cycling it and entering single user mode from the lilo prompt. Be sure to re-run lilo after you make changes.

Ipolit 02-10-2005 03:34 PM

I don't want to recompile the kernel
How can I delete them from /proc?

Phathead 02-10-2005 03:40 PM

Unless you've built a custom kernel that doesn't support loadable modules, you do not need to rebuild it. Blacklisting the modules does not require a rebuild. Also, changing the lilo configuration has nothing to do with rebuilding the kernel.

I don't know if deleting them from /proc will do anything for you. I'm pretty sure they'd either be recreated at bootup or it would destroy your system. You're welcome to try, but I don't know what will happen.

Ipolit 02-10-2005 04:30 PM

I found in /lib/modules/2.4.22/kernel/drivers/input
keybdev and mousedev
put them in /etc/hotplug/blacklist
installed the original 2.4.22 but the keyboard and the mouse are working

Phathead 02-10-2005 04:41 PM

The blacklist is only for devices controlled by hotplug (USB and Firewire mostly). If you have PS/2 keyboard and mouse, that route won't work.

Try rmmod on those two modules and see if that works. With PS/2, it should not be automatically re-enabled if you unplug and re-plug it. Just put the commands in your /etc/rc.d/rc.local. There will be no way to re-enable these modules without some kind of remote login like ssh or telnet.

Ipolit 02-12-2005 03:07 AM

I don't think that it's possible to rmmod compiled into kernel

All times are GMT -5. The time now is 02:07 AM.