Ubuntu – How to swap mouse buttons to be left handed from the terminal

command linemouse

I am left handed person.
Therefore I want to interchange the typical mouse buttons for right and left clicks.

I want to do this via terminal. May someone please suggest the command for it?

Is it possible to interchange these clicks at the login screen also? I am using Ubuntu 12.04.

Best Answer

xmodmap -e "pointer = 3 2 1"

in a terminal should work. If you want to run that command at the start of lightdm (the default login screen), you can edit /etc/lightdm/lightdm.conf like described here - use the xmodmap command instead of xbacklight in the script, of course.