Logitech universal receivers can be reprogramed on linux using the ltunify
tool.
Some distros package it, if not you can get it and build it from source on github at Lekensteyn/ltunify
Follow the instructions to build it then:
Plug in the receiver and run ltunify list
$ ltunify list
Devices count: 1
Connected devices:
idx=1 Mouse M510
Unpair the receiver using ltunify unpair <idx>
$ ltunify unpair 1
Device 0x01 Mouse successfully unpaired
Next run ltunify pair
an turn the new/other mouse off and on
$ ltunify pair
Please turn your wireless device off and on to start pairing.
Found new device, id=0x01 Trackball
Unplug and replug in the receiver and the receiver should work with the new mouse
$ ltunify list
Devices count: 1
Connected devices:
idx=1 Trackball M570
Thank you Lekensteyn for making a nice little tool!