Clipboard Improvements Idea

Sarah Strong sarah.e.strong at
Mon Apr 5 18:36:39 BST 2010


So I did some investigation of the clipboard problem yesterday. Here's what
I found:

   1. Most GUI applications I tested fail the copy-exit-paste test. A list
   of applications tested is at the bottom of this message
   2. Gnome-terminal handles copy-paste for applications that live in the
   terminal, and it succeeds on copy-close-paste
   3. Fixing the issue in GTK apps is fairly straightforward. You need to
   set gtk_clipboard_store on exit if you own the clipboard
   4. Most apps don't do that, likely some because they didn't test the
   issue on a machine without glipper/klipper/parcellite/clipman
   5. Other apps (Chrome, for one) intentionally do not use
   gtk_clipboard_store because it has a performance hit

I think it would easily be a summer's work to chase down and fix the bug in
many affected apps.

Each fix may require:

   1. Find an affected app. Focus on ones that are easy to fix first, then
   popular ones where users are likely to use the clipboard heavily. Copy,
   close, paste. Make sure the issue exists on the standard release version
   2. Track down a ticket. If none exists, create one. If it's listed as in
   progress, check if the issue is fixed in the nightly and contact the
   community. List the bug as in progress and contact the dev community
   3. May need to discuss the fix with the dev community if it's been
   rejected as a wont-fix
   4. Check out the dev branch, build, make sure the issue still exists
   there - copy, close, paste.
   5. Locate clipboard management code, compare to existing fixed clipboard
   management code
   6. Debug to understand how clipboard management is currently handled
   7. Debug to understand how application exit is currently handled
   8. Fix it, test if the fix works
   9. Run all regression tests
   10. Add documentation of the change where appropriate
   11. If they have a testing framework that allows automated testing of
   this change, add tests.
   12. Submit patch to the community, make any changes requested, resubmit

There are 12 weeks in GSOC. In that time, I believe I can fix at a rate of
one application a week, starting with smaller, easier to fix applications
and moving towards larger, more popular, more difficult to fix ones. Eight
fixes might be a good projected number of fixes to allow for unforeseen
difficulties and extra non-fix work.

Other deliverables:

   1. Web page that details how to fix this bug in other programs
   2. Convince GTK+ to set gtk_clipboard_set_can_store by default. There's
   likely a very good reason this isn't the case, but it might be a good thing
   to check out since it could potentially fix the bug in many apps at once.

I'm a bit concerned that the overwhelming ubiquity of this bug means maybe
we should be tackling it by adding glipper/klipper/parcellite/clipman to
Ubuntu by default, instead. What do you guys think?

tomboy notes

gnu emacs

On Mon, Apr 5, 2010 at 11:21 AM, Kamran Riaz Khan <krkhan at>wrote:

> Hash: SHA1
> On 04/03/2010 12:36 AM, James Westby wrote:
> > I believe glipper is also unmaintained, and crashes on startup for some
> > people, which I've looked at but couldn't work out the problem.
> I've seen glipper and Parcellite mentioned a lot in this thread but no
> one brought up Xfce's Clipman. I have used it for almost 2 years now and
> it works perfectly. At least, it retains texts and images after their
> originating apps are closed and also provides history and other useful
> features. I don't know how all this is achieved but I guess its code can
> prove to be a great starting point for this idea.
> - --
> Kamran Riaz Khan.
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Fedora -
> iEYEARECAAYFAku5/+gACgkQqmLaDkicJYAdYwCeKc6dl4sMV4p3dKmZHN8Sr0FA
> qo8AmwXzoo4RMaxC+PWEV+mM07JsrnGx
> =Zy/A
> --
> ubuntu-soc mailing list
> ubuntu-soc at
> Modify settings or unsubscribe at:
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the ubuntu-soc mailing list