-   Linux - Newbie (
-   -   Small shell script to get trackpad operating at startup (

trentfox 06-11-2008 06: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 09: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-13-2008 12:15 AM

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 02:52 PM.