/disable-middle-click-paste-ubuntu

Disable paste on click middle mouse button on Ubuntu

Primary LanguageShell

Disable paste on click middle button on Ubuntu

Execute script automatically when longin

  • Clone this repo and place it where you want
  • In your terminal, enter this command line:
  xinput list | grep 'id='
  • In the returned list, find the name of your mouse and copy it
  • Open your .xrinputrc file:
  vim ~/.xrinputrc
  • Add execution instruction to your .xrinputrc file:
  path/of/repo/clone/disable-middle-click-paste.sh "Name of your mouse"

💡 If you have many mouses, you can use a word contained in both mouses name like "Mouse" etc...

⚠️ But be carful this word must be contained in mouses name only.
You don't want the script to remap your other devices like keyboard etc...

  • Save it and restart your computer. Middle click is disable and scroll still work 💗

Execute manually

If you want to execute the script manually you just have to enter this command:

path/of/repo/clone/disable-middle-click-paste.sh "Name of your mouse"

Troubleshooting

I don't want to disable paste on middle click anymore

If you don't want to disable the paste on middle click anymore all you to do is to remove (or comment) the script call from your .xrinputrc:

  vim ~/.xrinputrc
  # Comment or remove this line
  path/of/repo/clone/disable-middle-click-paste.sh "Name of your mouse"