Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to paste my whole clipboard history consisting of words copied (Ctrl+C/by selection) during my reading sessions. I installed programs like Glippy and ClipIt but I couldn't figure out how to paste all the words, if ever exists such an option in these programs, I copy to a simple text file at once, not one word at a time. Can someone help me out?

Thank you!

share|improve this question
clipit stores its history in ~/.local/share/clipit/history, the format has some control characters, you can probably parse them out with sed, but that's a bit complicated – user35186 Sep 19 '12 at 15:06

there is python script for ClipIt run it like this python > clipit.history.txt

#!/usr/bin/env python
""" utility to print clipit history file.
If an argument is passed on the command line, it will
be used as a separator, otherwise history items are
separated by a blank line. """

import struct, os, sys

homedir  = os.environ['HOME']
histfile = homedir + '/.local/share/clipit/history'
if len(sys.argv) > 1:
    sep = sys.argv[1]
    sep = '---------------------------------------------------------------------'

with open(histfile,'rb') as f:
    size,_ = struct.unpack('2i',
    while (size > 0):
        item =
        print item
        _,_,_,size,_ = struct.unpack('5i',
        if size > 0: 
            print sep
share|improve this answer
haven't tried this, but it looks right and answers the question (regarding Clipit) – user7610 Jul 12 '14 at 15:16

You can see some strings in clipit history file with this command:

strings ~/.local/share/clipit/history

But it's not the best way. The output may be garbled.

share|improve this answer

The latest version of Parcellite has a Save As menu item when clicking the icon. This will save all the history entries to a file. There is also a paste all when right-clicking the history list, which will place the entire history list on the clipboard. The preferences have a Paste All delimiter that it will put at the end of each entry. ppa here:

share|improve this answer

Install KDE's Klipper Clipboard Manager Install klipper and use the following simple script:

text="nothing yet"
while [ "$text" != "" ]; do
  text=`qdbus org.kde.klipper /klipper getClipboardHistoryItem $cnt`
  echo "==== Clipboard content line $cnt:"
  echo "$text"                      # to terminal output
  echo "$text" > /path/to/file      # to file (EDIT this)
  cnt=$((cnt + 1))

Note: This does not behave very well in Unity so it seems. So in other desktop environments than KDE: your mileage may vary.

share|improve this answer
FWIW, someone having problems with Klipper and Unity:… – Sparhawk Mar 26 '14 at 10:05

user Parcellite, left click on its icon, "clear", select how many times you want, after that, "edit clipboard" and copy it all! Remember so set preference: use primary selection, to make it easier to copy the text!

share|improve this answer
Hi Acquarius! Thank you so much for the reply. However, when I click edit clipboard I only see the last word I copied and not the whole list. Maybe with you it works another way? Maybe I must configure something in the preferences. – pandisvezia Sep 21 '12 at 17:14
there is this file ~/.local/share/parcellite/history, the problem is it has non printable characters to newline and such.. you may try autoReplacing/erasing them but now this starts to get messy... – Aquarius Power Jan 6 '13 at 20:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.