Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'd like to disable the 3rd button emulation in ubuntu 9.10. Normally, I'd just change the option in xorg.conf and it would go away - but how do I deal with an autodetected mouse?

For example, I've got a mouse I connect to USB and it has the emulation enabled by default. How do I change it in that case?

share|improve this question
add comment

2 Answers 2

See https://wiki.ubuntu.com/X/Config/Input#Example:%20Disabling%20L+R%20mouse%20button%20paste%20on%20a%20two-button%20mouse

share|improve this answer
    
It works, but I won't upvote a post containing only a link to a massive wiki article. Please copy relevant information here. –  viraptor May 22 '10 at 20:13
    
What's the point in duplicating content? –  Florian Diesch May 22 '10 at 21:04
    
wikis change. Besides you have to read above the anchor you provided too to know how what are .fdi file and where to put them. –  viraptor May 22 '10 at 21:49
    
That's about the same as why I prefer to link this page: It gets updated for newer versions of Ubuntu so you know where to look if you upgrade to a newer version, and the page has all the information you need while I may forget something that's obvious to me (but maybe not to you) when paraphrasing or copying the text. –  Florian Diesch May 22 '10 at 23:40
add comment
up vote -1 down vote accepted

As described in https://wiki.ubuntu.com/X/Config/Input, this can be achieved via the hal policy configuration in ubuntu 8.10 -- 9.10. All .fdi files in /etc/hal/fdi/policy will affect the device being plugged in, if the specific match succeeds.

Current properties of a device can be checked via lshal | less. A mouse device will most likely contain a line like:

info.capabilities = {'input', 'input.mouse'} (string list)

In order to remove the 3rd button emulation, the following content has to be saved as an .fdi file in the policies folder:

<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
  <device>
    <match key="info.capabilities" contains="input.mouse">
      <merge key="input.x11_options.Emulate3Buttons" type="string">no</merge>
    </match>
  </device>
</deviceinfo>

Although the wiki lists other changes as well (like setting the driver to "mouse"), it does not always work and may cause xorg crash or hang completely. This is the minimal file needed to only disable the button emulation. The option will be changed after the device is plugged in again.

share|improve this answer
    
I don't think that's good manners. –  Florian Diesch May 26 '10 at 12:37
add comment

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.