Paste text into xterm in GNOME using gtk clipboard

I am developing a GTK-based application that should support the clipboard. For this I export data selection using gtk_clipboard_set_with_dataa target format: UTF8_STRING, STRING, TEXT, COMPOUND_TEXT, text/plain, text/plain;charset=utf-8, text/rtf, text/htmland text/url. Using this, I can copy text from my application to other text editors such as gedit. However, I cannot insert text in XTerm. Should I be exported for any other purpose? Where can I get a list of formats accepted by XTerm?

+3
source share
1 answer

xterm only uses the select buffer PRIMARY, so you should probably add this to your list.

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

+2
source

Source: https://habr.com/ru/post/1755916/


All Articles