PDA

View Full Version : How Do I


autek
12-04-2006, 04:49 PM
I need to run this at boot :

ed@w3nr:~$ synclient TouchpadOff=1

What do I need to do to make this happen ??

Ed

chris_b
12-04-2006, 04:58 PM
I have to disable DMA on my new DVD writer, so I

- created a directory /etc/rc.boot. All scripts in here get executed at boot time
- created a file in it called cdrom-dma-off containing

#! /bin/sh
hdparm -d0 /dev/hdc

then made it executable.

So I guess you could do the same to fix your touchpad.

Chris

ps I think I read somewhere this is deprecated, but then I'm old enough to be deprecated too so I'll let it ride till someone comes up with a better way that I can remember...

fos
12-04-2006, 05:07 PM
How about rc.local ?

autek
12-04-2006, 05:38 PM
So fos something like this ????

#! /bin/sh
synclient TouchpadOff=1


Ed

fos
12-04-2006, 06:06 PM
It's worth a try. rc.local is excuted last in the boot sequence.

fos....

autek
12-05-2006, 05:30 PM
Well fos, it didn't work....heres my rc.local

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

synclient TouchpadOff=1

exit 0


The permissions are set to root. Any ideas ?? I don't understand the term execution bits.

Ed

bhobjj
12-05-2006, 08:51 PM
I'm not sure that rc.local works with Debian, but it does for RedHat distros.

This works for Debian.

Copy your script to /etc/init.d/

and then update:
Debian uses the update-rc.d command to manage init scripts.
(notice the dot at the end of the line)
# update-rc.d myscript start 99 2 3 4 5 . stop 99 0 1 6 .


You can remove the script from the startup process:
# update-rc.d myscript remove

the 99 is the order. 99 is last number. It is used for kdm, gdm, etc.
A lower number would make the init script run sooner.

The 2 3 4 5 are the run levels.

GRML uses a text file instead of the /etc/rcX.d files.

fos
12-05-2006, 09:19 PM
I have been using CentOS for the most part for the last couple of months. :(

How does the init.d script work?

fos

autek
12-07-2006, 04:36 PM
Well Bob's suggestion didn't work either. I'm evidently not doing this right. I made a file called "tpad" and this is the contents:

#! /bin/sh
synclient TouchpadOff=1

root owns the file and its executable. From what I have read it should work, unless my synatx is wrong. Any ideas

Ed

autek
12-07-2006, 04:51 PM
I just had a thought....this is a command to run a Xorg entry. So wouldn't Xorg have to start before this is executed. ??

Ed

fos
12-07-2006, 05:24 PM
That is almost obvious. (Why didn't I think of that?) Have you looked at the Xorg config files?

autek
12-07-2006, 05:49 PM
Well I figured it out all by lonesome self (pat on back) I went to
preferences > sessions and added what I needed:

synclient TouchpadOff=1

Touchpad is now off, as I wanted.............hope this works.

Ed