4

I want to add some lines which should execute every time Ubuntu boots up, so I don't have to change them manually everytime. I've read in some place that you should edit this file /etc/rc.local. However when I add the lines I want to execute at start up it doesn't run those lines.

So I wonder where the start up file is located in ubuntu? Those lines I want to add is to change the sensitivity for the trackpoint

One of the lines I want to add: echo -n 250 > /sys/devices/platform/i8042/serio1/serio2/sensitivity

htorque
  • 64,798
starcorn
  • 1,011

1 Answers1

3

It's working fine here. Have you made sure that /etc/rc.local ends with "exit 0":

...stuff...

# set trackpoint sensitivity
echo -n 250 > /sys/devices/platform/i8042/serio1/serio2/sensitivity

exit 0

If it does, you're maybe using the wrong path. Try /sys/devices/platform/i8042/serio1/sensitivity instead.

htorque
  • 64,798
  • @htorque - The problem now it seems the file isn't run at boot up. Instead I have to run it manually with sudo /etc/init.d/rc.local start. Then the trackpointer start to be more responsive. Do you possible know some reason why rc.local isn't executed automatically? – starcorn Jan 16 '11 at 16:35
  • @starcorn: I'd first test, if it really isn't called during boot. Edit the file to just contain "touch /home/YOURUSER/Desktop/rclocal" and the "exit 0". Then reboot - if you find the file "rclocal" on your desktop, then the script was run and the problem is somewhere else. – htorque Jan 16 '11 at 16:53
  • @htorque- I have tried adding touch... to the rc.local file now, and the file ends with exit 0. After the reboot the file didn't appear on the desktop. But it will appear if I run the script manually. Where can the problem else be? :( – starcorn Jan 16 '11 at 17:54
  • Do you have the files /etc/rc*.d/S99rc.local where * is 2-5? – htorque Jan 16 '11 at 18:26
  • Yes I have that file in rc*.d 2-5 – starcorn Jan 16 '11 at 18:43
  • Okay, if you also have /etc/init/rc-sysinit.conf, /etc/init.d/rcS, and /etc/init.d/rc I have no idea what's going on. – htorque Jan 16 '11 at 18:49
  • is it /etc/init/rc-sysinit.conf or is it /etc/init.d/rc-sysinit.conf ? either case i dont have that file, but the other two is there – starcorn Jan 16 '11 at 19:14
  • Oh, great: now do sudo apt-get install --reinstall upstart and you should have the file /etc/init/rc-sysinit.conf. – htorque Jan 16 '11 at 19:29