LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 06-11-2008, 05:03 AM   #1
trentfox
Member
 
Registered: Jun 2008
Location: Peterborough, Ontario, Canada
Distribution: Ubuntu 11.04, UNE 10.10, CrunchBang Statler, Bodhi
Posts: 53

Rep: Reputation: 15
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.

Last edited by trentfox; 06-11-2008 at 05:07 AM.
 
Old 06-11-2008, 08:10 AM   #2
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,246

Rep: Reputation: 2475Reputation: 2475Reputation: 2475Reputation: 2475Reputation: 2475Reputation: 2475Reputation: 2475Reputation: 2475Reputation: 2475Reputation: 2475Reputation: 2475
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.
 
Old 06-12-2008, 11:15 PM   #3
trentfox
Member
 
Registered: Jun 2008
Location: Peterborough, Ontario, Canada
Distribution: Ubuntu 11.04, UNE 10.10, CrunchBang Statler, Bodhi
Posts: 53

Original Poster
Rep: Reputation: 15
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.
 
  


Reply

Tags
powerbook, trackpad, ubuntu, xorg


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Shell script to monitor or watch the disk space.... small help needed vikas027 Programming 5 10-21-2007 10:04 AM
Adding a shell script to startup Dakkar Suse/Novell 3 10-15-2005 08:00 AM
newbie help on small shell script ripcurl Programming 5 09-20-2005 03:17 PM
small shell script required demigor Programming 6 08-08-2005 04:38 PM
auto execute shell script on startup slackwbas Slackware 9 02-27-2005 10:26 AM


All times are GMT -5. The time now is 03:36 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration