Some operating systems resp. desktop managers clear copied content from the clipboard when the "source" program gets closed.


  • copy (Ctrl+c) some text from a webpage in your browser
  • close the browser
  • paste (Ctrl+v) this into a text file

→ Nothing gets pasted.

I read somewhere that this is for security reasons. Is this true? Why would it be insecure to keep the copied content in the clipboard?

  • 5
    I think the main reason this is done is that the clipboard content lives in the client's memory. It's about resource management, not security. Commented Nov 21, 2013 at 23:12

1 Answer 1


On X11 this happens because "Copy" doesn't actually copy anything - just tells the program to take ownership of the 'CLIPBOARD' selection. When you paste, the target program sends the selection's owner a request of the contents. This was initially done for performance since most or even all clients might be running on a mainframe and just connecting to your local terminal, so if there was a shared buffer then copying large amounts of data would have caused long delays. It is also more flexible because the program can offer copied data in many types (e.g. a word processor might have its own internal format, plus RTF, HTML, and plain text, or an image editor many different formats), and in the X11 case it doesn't need to pre-convert to all of them - just to a single format it was requested. In contrast, programs on Windows have to put all formats in the clipboard, and copy operations can be slow if you use Remote Desktop.

(Note that this doesn't depend on the desktop environment much, with the exception that some DEs - e.g. KDE - have "clipboard managers" that automatically hold a copy of the "copied" data. Beyond that, all X11 programs behave the same way and all Windows programs behave the same way.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .