Skip navigation.

GNOME Clipboard Daemon - your clipboard will actually work

FreeDesktop.org
FreeDesktop.org

Normally, when you copy something in an X application and you close it, the content of the clipboard is lost. This is probably one of the biggest reasons why people keep saying that copy & paste in Linux "doesn't work".

GNOME Clipboard Daemon is a program that keeps the content of your X clipboard in memory, so the clipboard won' get lost even after you close the application you copied from. It's a daemon - it has no GUI. You start it and it'll run in the background and Just Work(tm).Click here for more information, source & binaries.

Re: GNOME Clipboard Daemon - your clipboard will actually work

"What daemons should do to behave properly is store the clipboard data and wait for the application to be closed."

Ha, if only it's that simple. Currently X provides no mechanism to notify that the clipboard owner has been changed. You can find out the owner of the clipboard but you can't find out whether it has been changed (so you can't be notified if an application that already owns the clipboard puts something else on the clipboard).

Which means you have two options left:

1. Retrieve clipboard data every x seconds, regardless of whether the content of the clipboard has changed. Wait until the clipboard has no owner, then claim the clipboard. This will of course waste CPU power.

2. Use the current method: claim the clipboard and retrieve data & reclaim when ownership is lost.