The following solution globally disables paste on middle click for me while retaining all middle mouse button and clipboard functionality:
Follow the steps described in this answer, that is:
Install xbindkeys xsel xdotool
Place this in ~/.xbindkeysrc
"echo -n | xsel -n -i; pkill xbindkeys; xdotool click 2; xbindkeys"
b:2 + Release
Reload xbindkeys -p
In step 2. you may need to remove the + Release
part as described in this post, depending on what works on your machine.
Set up xbindkeys
to run on startup.
Then open Klipper, e.g. via the clipboard icon in the system tray > right click > Configure Clipboard. Uncheck the option 'Prevent empty clipboard'. Reboot and the problem should be solved.
The latter idea is thanks to milaq's XMousePasteBlock.