I don't have Gnome setup, but I do remember messing with this awhile back, and found that the Tk Text widget was a reliable way of setting the clipboard. See
It will copy the text to the mouse paste clipboard as well as the Edit menu paste command. It will copy to Gtk2 programs, but the Gnome Desktop? I don't know. Hope it helps. See also