SarahStrong-UDS

[[http://www.mail-archive.com/ubuntu-bugs@lists.ubuntu.com/msg2020266.html|The Great Clipboard Fixing Galore Project]]

This project is an accepted 2010 Google Summer of Code project for Ubuntu.

Project Description:

Many popular Ubuntu apps have the problem that Copy/Paste doesn't work if the source is closed before the paste. It's a problem that's been reported and discussed at length, and there are several possible solutions

#1 Install a clipboard manager such as glipper, parcellite, or klipper by default

#2 Change the specification and xorg to correspond, so that applications are not required to explicitly request storage of their clipboard contents on quit.

  • The way to implement this might be a hook on X quit that copies the selection from the quitting application into a special buffer - so sort of what klipper/glipper/do, but integrated into X and only done on application quit.
  • Xorg developers don't like this idea

  • It might create a performance problem
  • It's been suggested many times without being changed, and this appears to be because there is a very good reason for leaving X's implementation as it is.

#3 Bring affected apps up to spec, so that they export their clipboard contents on exit as required by gnome-settings-daemon.

  • The major objection to this solution is that it would be a big undertaking
  • There would be no way to guarantee this problem didn't crop up in new apps
  • Fixing the same problem in many different places sounds like poor design
  • On the other hand, this fix is exactly what the ClipboardManager spec expects from apps.

Please describe a tentative project architecture or an approach to it:

The current right way of implementing the fix is to make apps conform to the ClipboardManager spec. I'd like to investigate alternative ways to solve it, though, because the issue exists in more Ubuntu apps than not, and that fix would require one patch per application. The plan, developed with the help of other devs on the ubuntu-soc mailing list and #ubuntu-gsoc, is to spend a month investigating and documenting the problem. Then I'd either pursue the original plan to fix a variety of popular apps or pursue the new fix we determined during the month of investigation.

Give us details about the milestones for this project

Weeks 1-4

  • Fix the bug in one or more applications, documenting the steps taken
  • Create website explaining the bug and how to fix it in other applications
    • Include a minimal GTK+ application in which the bug exists, probably just a text field
    • Step by step instruction on fixing it the bug in this minimal app
    • And the finished product.
    • Also include a discussion of issues around clipboard management - the performance hit, clipboard managers. Assume the page will be found by devs trying to fix the issue, but also users googling the behaviour.
  • Test applications and compile a list of all affected popular open source Ubuntu apps
  • Contact developers on affected apps and link them to the website in case they're interested in fixing it
  • Research the best way to fix this bug. Possibilities include getting the GTK team to agree to store clipboard contents on app quit by default and incorporating a more robust clipboard management application in Ubuntu by default, a task that would involve modifying existing applications.
  • If we identify a better way to fix the bug, create an application to the mentor for the rest of the term's work.

Weeks 5-12

  • If a better way to fix the bug was identified in the first month of work and the mentor approved the work plan, follow that.
  • Otherwise, complete approximately one fix a week to apps identified in the first month, following these steps:
    • 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
    • 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
    • May need to discuss the fix with the dev community if it's been rejected as a wont-fix
    • Check out the dev branch, build, make sure the issue still exists there - copy, close, paste.
    • Locate clipboard management code, compare to existing fixed clipboard management code
    • Debug to understand how clipboard management is currently handled
    • Debug to understand how application exit is currently handled
    • Fix it, test if the fix works
    • Run all regression tests
    • Add documentation of the change where appropriate
    • If they have a testing framework that allows automated testing of this change, add tests.
    • Submit patch to the community, make any changes requested, resubmit

Why will your proposal benefit Ubuntu?

It's a long-standing bug that we could fix for many major applications over the course of the summer. It has 2426 votes in Ubuntu Brainstorm and 85 "issue affects me too" and 80 comments in Launchpad.

GSoC/2010/SarahStrong-UDS (last edited 2010-05-10 15:45:09 by 201)