Contents of clipboard is deleted when the program from which text was copied is closed

Asked by Rune K. Svendsen

This has been bugging me (no pun intended) for a while now, so I've decided to report it as a bug because that's what I consider it to be, please correct me if it has some function I have overlooked.

Example: I want to start VirtualBox so I click on my short cut to VirtualBox. Because I've upgraded VirtualBox the kernel module needs to be recompiled and a windows appears which says which command to run in order to do this. I highlight the command, and copy the text and close the window. I open a terminal and I try to paste the copied text but it's gone!

If I run VirtualBox again, copy the text and paste it into the terminal while keeping the window with the text open it works fine. But as soon as I close the program from which I copied the text, the text disappears from the clipboard!

This is, IMO, really annoying and I've experienced it several times now with other programs that I've copied text from and tried to paste after the program has been closed.

System information:

rune@runescomp:~$ lsb_release -rd
Description: Ubuntu 8.04.1
Release: 8.04

Question information

English Edit question
Ubuntu Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Florian Diesch (diesch) said :

Thank you for taking the time to report this issue and helping to make Ubuntu better. Examining the information you have given us, this does not appear to be a bug report so we are closing it and converting it to a question in the support tracker. We appreciate the difficulties you are facing, but it would make more sense to raise problems you are having in the support tracker at if you are uncertain if they are bugs. For help on reporting bugs, see .

Revision history for this message
Florian Diesch (diesch) said :

X (the graphical window system in Linux) has three buffers for storing temporary content:
 * the primary selection
 * the secondary selection
 * the clipboard

The primary and the secondary selections work similar to drag-and-drop (but without the drag): If you insert them the receiving programs asks the program holding ther selection for the selected content and inserts it. If there is no selection (e.g. because the program holding the last selection exited) nothing is inserted. When you copy using the middle mouse button the primary selection is used.

See if you wnat to know a bit more about this.

If you don't like this behavior use a clipboard manager like glipper (Gnome) or klipper (KDE)

Can you help with this problem?

Provide an answer of your own, or ask Rune K. Svendsen for more information if necessary.

To post a message you must log in.