Search code examples
clinuxgtkclipboardxterm

pasting text to xterm in GNOME using gtk clipboard


I am developing a GTK based application which has to support clipboard. For that I am exporting selection data using gtk_clipboard_set_with_data with the target formats: UTF8_STRING, STRING, TEXT, COMPOUND_TEXT, text/plain, text/plain;charset=utf-8, text/rtf, text/html and text/url. Using this I am able to copy-paste text from my aplication to other text editors like gedit. However, I am not able to paste text to XTerm. Should I be exporting to any other target? Where can I get a list of formats accepted by XTerm?


Solution

  • xterm only uses the PRIMARY selection buffer, so you should probably add that to your list.

    See http://www.davidsimmons.com/soft/xtermhacks/#copynpaste and http://www.freedesktop.org/wiki/Specifications/ClipboardsWiki for more information.