In order to get the middle-mouse button to scroll you need to edit a configuration file. This is probably the most “dangerous” step in the guide, it could make you unable to access your regular account without fixing an issue if something else gets changed, but if only these options are changed you should be fine. Just in case, ALWAYS BACK UP before editing xorg.conf. To back up, open a terminal and enter:
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
What this does is it copies the xorg.conf file to another file named xorg.conf.backup in the same directory. If you have to revert to the original one from the failsafe terminal mode, or a live CD, you will need to enter the opposite:
sudo cp /etc/X11/xorg.conf.backup /etc/X11/xorg.conf
That will replace the one you edited with the backup version you made before.

Now onto editing. In a terminal, enter:
sudo gedit /etc/X11/xorg.conf
You will then need to find the section labeled “Section “InputDevice”” that also has “Identifier “Configured Mouse”” in it. Mine is the second one on the list. Then put a pound sign (#) before each line in that section, and above it another line with a pound sign and “Original mouse configuration” The “#” means that line is a comment, and will not be read. Doing this gives you the opportunity to fix errors without erasing all of your configurations, and to know what you did. After the original section is commented out, type in this mouse section (above or below doesn’t matter) If you choose to copy-paste this section, make sure you re-type each quotation mark, because wordpress changes quotes to curved quotes instead of straight quotes, and the curved will cause an error.:
#Configured Mouse
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "Protocol" "ExplorerPS/2" #IMPS/2 is not recommend for TrackPoints
Option "Device" "/dev/input/mice"
Option "EmulateWheel" "on"
Option "Emulate3Buttons" "on"
Option "EmulateWheelButton" "2"
Option "YAxisMapping" "4 5"
Option "XAxisMapping" "6 7"
EndSection

Note: I would tab over all the lines between Section and EndSection just to keep in the same format as the rest of the file. My blog won’t let me tab it over in the post. Here is a screenshot of the original and final xorg.conf files next to each other.
original and backup xorg.conf files
Then save the file, and restart your computer. Hopefully everything will work out great and you will now have a working middle mouse button, if not though, log into the Failsafe Terminal mode and either fix the error, or restore the backup. If you see random brown pixels on the desktop, clicking doesn’t work like it used to, or something is much more messed up, restore the backup or reconfigure using the instructions in the “Repairing xorg.conf” section in the notes.

If you have issues with the middle mouse button acting as “paste” as well as scrolling in Firefox, (an issue I found very annoying while writing this blog) all you need to do is open a new firefox tab, and navigate it to about:config then in the filter bar type “mouse,” and change the value of middlemouse.paste to false by double-clicking on it or right-clicking on it.