Q:

Wayland clipboard API

Is there such a thing as a clipboard API in Wayland? Or where should I look to paste contents to the clipboard programmatically?
I am running Fedora 24 on Wayland.
Having a single clipboard if perfectly fine with me, so is there a code example (in Python, etc.)?

A:

In Linux we have two 'clipboards'. Primary selection and clipboard.
Clipboard is defined by the Wayland protocol here: https://wayland.freedesktop.org/docs/html/ch04.html#sect-Protocol-data-sharing
The primary selection is unwanted in Wayland, because it is considered unsecure. But to smooth the move from X to Wayland, an extension, disabled by default, has been created: https://wiki.gnome.org/Initiatives/Wayland/PrimarySelection

