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.

In Ubuntu, the mouse middle-button (wheel-button) pastes the clipboard contents when clicked. When I'm scrolling it keeps pasting things between my codes and most times I don't notice. I can solve this problem temporarily with doing this. But whenever I reboot the my computer, the behavior comes back.

How can I disable this behavior permanently? I don't want my wheel-button to paste.

share|improve this question
add comment

2 Answers

Create a .desktop file in

~/.config/autostart

The easiest way would be to copy an existing autostart .desktop entry and change the exec line to run the xinput command needed to switch off paste.

Once done, this will execute each time you login.

share|improve this answer
add comment

Assuming you're using ubuntu, they have a guide on how to do it

To sum it up

$ xinput list | grep 'id='

to list all your input devices. Find your mouse there

xinput get-button-map 4

To list all your buttons - you will get a VERY long list of numbers starting with 1 2 3 (which represent left right and middle button)

To disable the middle mouse button

xinput set-button-map 4 1 0 3

to remap it to the left mouse button

xinput set-button-map 4 1 1 3

Scrolling should still work since the scroll wheel is seen as a seperate button

Personally though, swipe + middleclick to copy/paste is awesome

share|improve this answer
    
As I said in my question, it is not a permanent solution. When I boot my computer, the bad behavior comes back. –  kami Oct 21 '11 at 0:34
    
I even mentioned the same link that you have provided! Have you really read my question?! –  kami Oct 21 '11 at 0:34
1  
oh, i missed 'To make this set on a per-user basis, I can plug that line into my ~/.xstartup or other init file. It can also be done via configuring a matching InputClass section on xorg.conf. ' , which would make it persistant. –  Journeyman Geek Oct 21 '11 at 0:56
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.