LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 16.04, Unity & Gnome-shell
Posts: 83

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
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,689

Rep: Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972
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 16.04, Unity & Gnome-shell
Posts: 83

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



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 / openSUSE 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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:01 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration