LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Small shell script to get trackpad operating at startup (http://www.linuxquestions.org/questions/linux-newbie-8/small-shell-script-to-get-trackpad-operating-at-startup-648521/)

trentfox 06-11-2008 05:03 AM

Small shell script to get trackpad operating at startup
 
I am a Mac user and a newcomer to Linux, and I recently made my PowerBook G4 a dual boot with the latest version of Ubuntu (8.04). While most of my hardware was recognized properly, my trackpad wasn't, and although there is a trackpad entry in my /etc/X11/xorg.conf file, it does not automatically enable the tap feature. I can do this after each startup at the Terminal with "sudo trackpad tap", but I would like this to be done automatically. A colleague suggested I write a simple shell script to do this, but the question is how to write it so that I don't have to password-enable it after the boot sequence. Is there a way to do this as root and a place to put it where a password isn't requested? If not, if I write a simple text file with "sudo trackpad tap" in it, where would it go and would that result in a simple password request after the boot sequence. Note: I have never written a script of any kind before.

TB0ne 06-11-2008 08:10 AM

Not sure about Ubuntu, but you should be able to put it in one of your startup scripts, and it'll run as root at boot time, so that should take care of your password problem.

I'd put it in rc.local, which is the last script that gets run, after all the other system init stuff is finished, but that's just one place you could put it.

trentfox 06-12-2008 11:15 PM

Thanks for the suggestion, TBOne. I added the words "trackpad tap" at the end of the rc.local file (I think it was rc2.local), and now I have tapping enabled when I start up. :)


All times are GMT -5. The time now is 09:04 AM.