ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a notebook, and when I try to write text documents, sometimes the cursor moves to a completely different part of the screen.
I found the solution, and thats to modprobe -r the module which drives the touchpad. However, once I've finished writing a text document, I'd like to be able to turn the trackpad back on, by loading the same kernel module as I used to turn it off.
I want both on and off functionality tied to a single key on my keyboard, so I guess I need a bash script, but I dont know how I'd do that. I was hoping someone might be able to help with a script.
I have a notebook, and when I try to write text documents, sometimes the cursor moves to a completely different part of the screen.
I found the solution, and thats to modprobe -r the module which drives the touchpad. However, once I've finished writing a text document, I'd like to be able to turn the trackpad back on, by loading the same kernel module as I used to turn it off.
I want both on and off functionality tied to a single key on my keyboard, so I guess I need a bash script, but I dont know how I'd do that. I was hoping someone might be able to help with a script.
We'll be glad to help...so post what you've written/tried so far, and where you're stuck. Depending on your window manager, you can probably tie a script to a particular hotkey, so that part is fairly easy. To get something to 'toggle' as you'd like, try looking for the module first with an lsmod command...if it's there, run the modprobe -r. If it's NOT there, just modprobe.
We'll be glad to help...so post what you've written/tried so far, and where you're stuck. Depending on your window manager, you can probably tie a script to a particular hotkey, so that part is fairly easy. To get something to 'toggle' as you'd like, try looking for the module first with an lsmod command...if it's there, run the modprobe -r. If it's NOT there, just modprobe.
Im not too good with bash scripting, although I do know which driver module to remove/load ('psmouse'). I can tie the script to a key with fluxbox, its just getting the script to toggle from on to off, off to on, etc.
Im not too good with bash scripting, although I do know which driver module to remove/load ('psmouse'). I can tie the script to a key with fluxbox, its just getting the script to toggle from on to off, off to on, etc.
There are excellent tutorials you can read, the links are in my posting signature. The hints I provided before should be what you need to get going. What you need to do is to run lsmod and pipe it into grep looking for your psmouse module. Again, if it's present, run the modprobe -r to remove it. If it's NOT found, run the modprobe to insert it.
A good way to get better at scripting is to actually DO it. Again we will be glad to HELP, but we aren't going to write your scripts for you.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.