Sterling Ambivalence (sterlingnorth) wrote,
Sterling Ambivalence

Random Linux Annoyance... The Clipboard's Short Term Memory Loss.

One feature taken most for granted in modern computing is the system clipboard. The clipboard allows you to set aside some data from an application to use later without having to write it out to disk. You can also use the clipboard to transfer data from one application to another, again without having to save a file to disk or other permanent storage. In the two most common computer operating systems, Microsoft's Windows and Apple's Mac OS X, the data in the clipboard is persistant throughout your session -- data you send to the clipboard remains in the clipboard until either replaced with new data sent there, or you log out or shut off your machine. In the rare case a program wants to depart from convention and empty the clipboard for any reason, the program will ask for permission. For example, if you use Adobe Photoshop and send data to the clipboard, when you exit the program it will display an dialog box asking if you want to clear the clipboard. While it makes sense for Photoshop to clear the clipboard upon exit -- complex image data Photoshop sends there can use a lot of memory, and few other programs can make sense of it -- it still will ask for permission.

However in Linux, good Lord, why?! Why can't I count on Linux to hold data in the clipboard for any length of time? I have discovered if I cut or copy something from a GAIM window into the clipboard-- GAIM is a multiprotocol instant messenging client typically found on Linux -- and close that window, what I sent to the clipboard is erased. It's not even exiting the GAIM program that erases the contents of the clipboard... all it takes is closing the window from which you've cut or copied the string of text. And all this is done without any notice given to the user that the clipboard is behaving in such an unusual way. OK, to be fair, this form of brain-deadedness is very likely from GAIM itself (version 1.5), but what possible benefit did someone see in this behavior? I'm sure it saved some programmer an hour of code writing (Linux has a notoriously goofy clipboard that was hacked and beaten into the window manager), but it has probably killed millions of braincells from innocent users who can't figure out why the clipboard in Linux doesn't work like it is supposed to.

Eh.. Linux is loonier than I thought. There's is no actual clipboard as in intermediary location set aside in memory for cut/copied data for pasting, but rather a note telling an application that when a "Paste" command is given, then the application sends the data cut/copied. In other words, if the originating app is terminated, there will be nothing left to paste. This is counter to any normal expectation how a clipboard operates. Though it lets the developers of Gaim off the hook.
  • Post a new comment


    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.