Use Mouse Buttons to Perform Copy / Paste in Linux (Updated)
This is a following-up post for this post. In my previous post, I have discussed how to perform copy/paste quickly using mouse buttons. The setup requires Compiz. If you use Compiz as your window manager, great, you don't need to read this article. If you don't, you still have alternative.
- x11-utils (if you want seamless copy/paste in terminal window)
If any of above is not installed, you can install them by
sudo apt-get install [packageName]
Add the following content to ~/xbindkeysrc. If the file does not exists, run xbindkeys -d > $HOME/testrc to generate a default configuration file.
"$HOME/scripts/auto/copy-paste.sh copy" b:6 "$HOME/scripts/auto/copy-paste.sh paste" b:7
Follow this guide to create a copy/paste script, and save the script to the location you specified in .xbindkeysrc.
Also, chnage b:6 and b:7 accordingly.
killall xbindkeys && xbindkeys
Why hadn't you use this at the first place?
I had imwheel installed in my system, which took precedence over xbindkeys on mouse buttons. Once imwheel was removed, I was able to get xbindkeys working with mouse buttons. I am putting this up for those who might need it.