Search code examples
linuxlazarus

Copy text to clipboard, Linux, make it permanent


I use Lazarus 1.7. Ubuntu 14. I copy text to clipboard,

Clipboard.AsText:='some txt';

When my app exits, clipboard cleared by OS: how to copy text permanent? So after exit of app, the clipboard still has this text?


Solution

  • You can't, since X has no "clipboard" per se. A process must remain open to respond to the SelectionRequest event that actually requests the contents of the clipboard.