linux剪贴板在C中读/写

我做了很多谷歌搜索,但我仍然不确定如何继续.

Linux下读/写剪贴板最常用的方法是什么?我想要支持Gnome& KDE桌面.

更新:我认为没有一个简单的解决方案,必须将多个来源(gnome,kde)“聚合”在一起才能制定解决方案?

解决方法:

也许你可以看看xclip并看看他们是如何做到的.

It provides an interface to X
selections (“the clipboard”) from the
command line. It can read data from
standard in or a file and place it in
an X selection for pasting into other
X applications. xclip can also print
an X selection to standard out, which
can then be redirected to a file or
another program.

上一篇:复制粘贴在JavaScript中


下一篇:linux – 使用vala将uris插入Gtk.Clipboard