Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I would like to make Ubuntu "remember" the following command line (for trackpad to work):

xinput set-prop "Cypress APA Trackpad (cyapa)" "Synaptics Finger" 15 20 256

is there a way to make this permanent, so I dont have to type it in every time I start the computer?

Cheers!

Luke

share|improve this question
    
You mean when using a desktop? Or does this also need to work when in a terminal? –  Rinzwind Feb 14 '13 at 12:23
    
I would think the command is sudo update-grub. –  nerof61 Feb 14 '13 at 17:22

2 Answers 2

Starting script when computer starts

I found out way to make program run when machine boots. Just type in Terminal

  1. cd /etc/init.d - going to init directory
  2. And now we gonna write script that will do your command. For that type sudo gedit trackpad and paste this code in

     #! /bin/sh
     # /etc/init.d/trackpad
     #
     xinput set-prop "Cypress APA Trackpad (cyapa)" "Synaptics Finger" 15 20 256
    Save that file. With this step you have created script that must run and 'start' your trackpad. Important to make file executable using chmod 755 fileName

  3. Now we will need to say computer to run that script when computer boots. For that type this command: sudo update-rc.d trackpad defaults

  4. Now you're done, just try to reboot computer :)

Sources:

Starting script when user will login using 'Startup applications'

Just add that to startup, and it will work when your computer will start. To do that just go to Unity and search for Startup Applications, click Add and type name link Trackpad start and in Command field fill in:
bash -c 'xinput set-prop "Cypress APA Trackpad (cyapa)" "Synaptics Finger" 15 20 256'


image
Notice that second way will work only when you will log in, not when computer will start.

share|improve this answer

You can put this command to the bash startup file try to paste it to

 ~/.bash_login

and restart computer and see if it worked.

share|improve this answer
    
Super thank you! –  user130427 Feb 14 '13 at 12:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.