LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 08-01-2005, 08:45 PM   #1
Zaulden
LQ Newbie
 
Registered: Jul 2005
Location: PA, USA
Distribution: Ubuntu v5.04 Hoary Hedgehog
Posts: 27

Rep: Reputation: 15
Performing an action every reboot


The touchpad on my Compaq Presario R3210US does not work on boot up unless I issue the following commands: rmmod psmouse, modprobe psmouse. Then it works immediately.

I've tried adding these commands to /etc/X11/xinit/xserverrc and it doesn't work on startup still unless I manually issue the commands. Where else should I look to add these to get my touchpad working all the time? I'm using Ubuntu 5.04.

Thanks in advance.
 
Old 08-01-2005, 11:26 PM   #2
juanbobo
Member
 
Registered: Mar 2005
Location: Chicago
Distribution: Gentoo AMD64
Posts: 365

Rep: Reputation: 30
You could put those commands at the end of any executable file in the /etc/init.d directory or make your own and chmod +x it.
 
Old 08-02-2005, 05:05 PM   #3
Zaulden
LQ Newbie
 
Registered: Jul 2005
Location: PA, USA
Distribution: Ubuntu v5.04 Hoary Hedgehog
Posts: 27

Original Poster
Rep: Reputation: 15
In my init.d directory, I made a file called mouseinit and put the following code inside it:
Code:
rmmod psmouse
modprobe psmouse
I then did a chmod +x on the file, but the touchpad still doesn't work unless I do a rmmod psmouse and modprobe psmouse manually.

Any other ideas?
 
Old 08-02-2005, 05:11 PM   #4
juanbobo
Member
 
Registered: Mar 2005
Location: Chicago
Distribution: Gentoo AMD64
Posts: 365

Rep: Reputation: 30
Maybe the file has to start with "rc.", try putting those commands in any other script.
 
Old 08-02-2005, 05:14 PM   #5
Zaulden
LQ Newbie
 
Registered: Jul 2005
Location: PA, USA
Distribution: Ubuntu v5.04 Hoary Hedgehog
Posts: 27

Original Poster
Rep: Reputation: 15
Tried renaming the file to rc.mouseinit - no go. Grr.

All the scripts in this directory in Ubuntu aren't in a rc.name format. I'm thinking maybe Ubuntu loads stuff a bit differently than other distros? I know in Slackware I had an easy time loading commands on bootup by adding lines to my rc.local file.

Last edited by Zaulden; 08-02-2005 at 05:17 PM.
 
Old 08-02-2005, 06:44 PM   #6
DaveAtFraud
Member
 
Registered: Feb 2003
Location: Parker, CO USA
Distribution: CentOS primarily but I multi-boot my laptop to Ubuntu or Fedora Core 10 as needed
Posts: 48

Rep: Reputation: 15
Traditionally stuff like this should just be added to /etc/rc.d/rc.local. For my HP Pavilion the magic to making the touchpad (Synaptics) work is to execute the following command when the system boots:

echo -n "reconnect" > /sys/bus/serio/devices/serio0/drvctl

No reason you can't add your rmmod and modprobe commands instead. rc.local gets executed *after* all other initialization scripts (the stuff in /etc/init.d). This should still be prior to X if you boot in graphical mode.
 
Old 08-03-2005, 08:14 AM   #7
Zaulden
LQ Newbie
 
Registered: Jul 2005
Location: PA, USA
Distribution: Ubuntu v5.04 Hoary Hedgehog
Posts: 27

Original Poster
Rep: Reputation: 15
In my Ubuntu install, I don't have a /etc/rc.d/ directory.

Instead, I have a rc0.d, rc1.d, rc2.d, rc3.d, rc4.d, rc5.d, rc6.d, and rcS.d. Also, in all of these directories, there is no rc.local file.

Could anyone be of any further assistance?
 
Old 08-03-2005, 10:31 AM   #8
Vgui
Member
 
Registered: Apr 2005
Location: Canada
Distribution: Slackware
Posts: 496

Rep: Reputation: 31
At worst you could try appending it to your actual runlevel script (so it starts as part of the normal runlevel X process).
 
Old 08-03-2005, 10:39 AM   #9
Zaulden
LQ Newbie
 
Registered: Jul 2005
Location: PA, USA
Distribution: Ubuntu v5.04 Hoary Hedgehog
Posts: 27

Original Poster
Rep: Reputation: 15
I actually found out from a previous thread how to do this just now...
http://www.linuxquestions.org/questi...hreadid=346690

I followed the first technique, which involved making my own rc.local file, but it seems there is also a bootmisc.sh which I can append to with commands, but that file seems pretty full of nested ifs, so I'm not sure where to put extra commands.

Either way, I finally got it working, so if anyone else ever has this problem with Ubuntu... check out that thread.
 
Old 08-03-2005, 05:28 PM   #10
germanyzulu
LQ Newbie
 
Registered: Jul 2005
Distribution: Ubuntu "Dapper" 6.06 LTS
Posts: 18

Rep: Reputation: 1
I don't mean to take over this thread but as it seems Zaulden has fixed his problem...I have another question:

I thought it might work to put the commands into a cron job (system wide /etc/crontab or personal ~/crontab) with the "@reboot" tag like so (See "man 5 crontab" for the "@reboot" tag)

But I wasn't sure how soon after reboot the job would run, so I tested it:

Code:
user@localhost:~$ cat /etc/crontab
[...]
@reboot root /usr/bin/uptime

user@localhost:~$ cat ~/crontab
@reboot /usr/bin/uptime

user@localhost:~$ crontab -u user ~/crontab
user@localhost:~$ shutdown -h 2                           # 2 minutes to let the system wide crontab to load
However neither one worked!!!

Anyone know how i should have done this ???
 
  


Reply


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
Performing dhcpcd Mingthefirst Linux - Newbie 4 07-24-2004 02:39 AM
Performing a Software Reset from Linux 7.2 to cause a reboot of the x86 processor esi-eric Linux - Hardware 6 07-06-2004 02:17 PM
Best performing Nvidia drivers? cratos Slackware 10 02-04-2004 08:39 AM
performing tasks as root curos Linux - Newbie 1 08-06-2003 03:17 AM
Non performing CGI script Bill Barrington Linux - Networking 1 05-17-2003 01:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 09:32 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