Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 have a set of commands that I manually enter each time I start up my Ubuntu installation (12.04). They help even out my mouse pointer acceleration as setting them in the mouse settings tab does not work (it doesn't go to the level I need).

So I do this:

xinput --list

From here, I can see the 'id' that is attached to my mouse (along with a bunch of other peripherals).

    Virtual core pointer                        id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ bcm5974                                   id=10   [slave  pointer  (2)]
⎜   ↳ Razer Razer Naga Epic                     id=12   [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Power Button                              id=7    [slave  keyboard (3)]
    ↳ Sleep Button                              id=8    [slave  keyboard (3)]
    ↳ Apple Inc. Apple Internal Keyboard / Trackpad id=9    [slave  keyboard (3)]
    ↳ Built-in iSight                           id=11   [slave  keyboard (3)]
    ↳ Razer Razer Naga Epic                     id=13   [slave  keyboard (3)]
    ↳ Logitech G510 Gaming Keyboard             id=14   [slave  keyboard (3)]
    ↳ Logitech G510 Gaming Keyboard             id=15   [slave  keyboard (3)]

After doing this I type the command:

xinput --set-prop "12" "Device Accel Constant Deceleration" 3

I'm trying to come up with a way to automate this process on each boot, but I can't figure out how to get the id. It changes on each boot most of the time. I know that I can put the information for start up commands in /etc/rc.local, but I don't know how to get the dynamic id.

I hit a wall at this point:

xinput --list --short 'pointer:Razer Razer Naga Epic'

From here I can see the specific id of 12, but I can't figure out what the 'get property' command is.

Thanks for any help you can provide.

share|improve this question
up vote 1 down vote accepted

You may find adding appropriate section to xorg.conf more convenient.

For example:

Section "InputClass"
    Identifier      "generic mouse"
    MatchIsPointer  "yes"
    MatchProduct    "Razer Razer Naga Epic"
    Option          "SendCoreEvents"         "on"
    Option          "Emulate3Buttons"        "on"
    Option          "AccelerationScheme"     "predictable"
    Option          "ConstantDeceleration"   "3.0"
share|improve this answer
Perfect, thank you. – krx Aug 11 '12 at 15:59

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.