Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I successfully followed the answer to this question to set different sensitivities for my touchpad and my USB mouse. Only problem is, once you unplug and replug the device or shutdown, restart etc., the settings reset.

share|improve this question
up vote 11 down vote accepted

According to How to configure the TrackPoint (from ThinkWiki), the method for changing the settings on a per-user basis is by using the .xsessionrc file, simply put all your xinput commands into that file and you should have your settings on boot.

The settings should be remembered after you unplug and replug the same device. But if they're not then we have a bug to report. I looked into all the events that happen when input devices are detected and I don't mind telling you that it's a real mess. If you need to go to a plan B then try adding the options into x.conf.d as shown in the above website.

share|improve this answer
FWIW whenever I tweak my Synaptics touchpad settings with xinput, my tweaks are forgotten when I suspend and resume. Ubuntu 10.10. – Marius Gedminas Jan 6 '11 at 20:22
That's a bug, please report it. – Martin Owens -doctormo- Jan 6 '11 at 20:50
Nice, I could disable the redundant and irritating touchpad buttons without affecting horizontal/vertical scrolling: echo xinput --set-button-map 'SynPS/2 Synaptics TouchPad' 0 0 0 >> ~/.xsessionrc – Jesse Glick Sep 11 '12 at 14:47
On linux mint the file name is .xinputrc . :-) – inf3rno Aug 24 '15 at 4:56

I know this is a bit old, but in Ubuntu 14.04 I couldn't find a .xsessionrc or x.conf.d file, so I had to use xinput from the terminal. This is how you do it:

  1. Check the name of your device:

    xinput list
  2. See available options for your device:

    xinput list-props "Your Device Name"
  3. Edit settings (to make settings consistent after reboot/shutdown just add this command to Startup Applications):

    xinput set-prop "Your Device Name" "Option Name" "Value"

    Here is an example command I used to activate locked drags in my touchpad:

    xinput set-prop "SynPS/2 Synaptics TouchPad" "Synaptics Locked Drags" 1

    To activate/change another option just look for it in your device available options and play with them until you get the desired result.

You now know which commands resolve your problems. They may be more than one. Your next job is to add these commands to 'Startup Applications'. To do so:

  1. Open 'Startup Applications'.

  2. Click 'Add' and in the command field paste the desired command. Click 'Add'. You have added the first command.

  3. Add the other commands too in similar fashion (if you have more than one command). You are done. Next time you restart your computer, Ubuntu will automatically run these commands which will fix your mouse issues.

share|improve this answer
You can just create the file in your home directory if it doesn't exist. – Ian Dunn Apr 25 '15 at 7:19

Your Answer


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.