How can I merge the gnome clipboard and the X selection?

Solution 1:

autocutsel is what you want to sync between the primary X/X11 clipboard and the Gnome/GTK clipboard! Here's how:

$ autocutsel &
$ autocutsel -s PRIMARY & 

Magic!

Solution 2:

"autocutsel" will not do what you want.

This issue has existed for over a decade, till I found a fix a few weeks back.

You need to do this:

apt-get install parcellite

Right click go on the icon and go to the "Preference"

Check the following:

  • Use Copy (Ctrl-C)
  • Use Primary (Selection)
  • Sync clipboards

Solution 3:

So I actually like to keep the various copy buffers separate, and occasionally sync from one or the other (like when I'm using keepass2.) So if I want to move something from the clipboard to the primary copy (middle mouse button) buffer, I'll do:

xclip -o -selection clipboard | xclip -i 

Solution 4:

I think autocutsel will solve your problem. Most distro package cleverly as "autocutsel". In ubuntu it's in the universe repository.