10 Answers
10

I am using xsel, but I am only using it with plain text and unicode text.

xsel can copy and paste to three different "clipboards". By default, it uses the X Window System primary selection, which is basically whatever is currently in selection. The X Window System also has a secondary selection (which isn't used much), and a clipboard selection. You're probably looking for the clipboard selection, since that's what the desktop environment (e.g. Gnome, KDE, XFCE) uses for its clipboard. To use that with xsel:

Adi... xsel seems(?) to be only text based (as you mentioned), so I'll look for a more comprehensive utility... However, it has been very interesting for me to read its info documentation... I knew that middle-clicking the mouse (in the Terminal) would paste the currently selected text into the command-line, but I didn't realize that this feature applies to most X apps... The most-recent text selection can be pasted via a middle-click (but some apps seem to override it).. Two clipboards!.. Very handy.. .I must read more about the 3rd X-selection buffer.
–
Peter.ONov 7 '10 at 15:14

I've got to get my head around this new info.. 3 clipboards! PRIMARY, SECONDARY, CLIPBOARD... This is very different to what I'm used to in windows... The 3rd one "CLIPBOARD" seems to be the same as a Windows / Mac clipboard... but it is ridiculously late here.. I'll get back to this tomorrow... (Inersting, but too much to read now..)
–
Peter.ONov 7 '10 at 16:54

Thanks... xsel does the job (for text)... Something might turn up for other formats.
–
Peter.ONov 9 '10 at 20:17

Thanks... xclip works fine for text (it is very similar to xsel) ... and as for the "other" formats, I've come to realize that the Linux clipboard system is quite different to Windows, and I've got a bit more reading to do first...
–
Peter.ONov 9 '10 at 20:29

1

Also, the command can be as short as xclip -se c
–
Jeromy AnglimOct 5 '11 at 1:05

This looks like a good panel-app.. The "Actions" is handy... but unfortunately its not the type of tool I am looking for.. I've re-worded my question to include some more specific info... Maybe the exact thing I'm after is an obscure Python script, or the like... There were a couple of very good native Windows-only utilities available, so I'd think an equivalent would be floating around somewhere in the Ubuntu/Linux world...
–
Peter.ONov 7 '10 at 16:18

A new clipboard manager with Indicator Applet support was recently released (though not in the archive yet). In addition to tracking text clipboard history it will also capture and persist data clipboard entries as well (Files, Folders, etc) which may be useful if you manipulate files a lot via a GUI/Clipboard environment.

Thanks for the suggestion Marco, but I don't have any need for a clipboard manager. Occasionally I'll paste some temporary text into a text file , but I actually find that a "history manager" slows things down (but that's just me).. I'm really after a command-line tool which can selectively extract/store a specific format from/to the clipboad.. I am assuming the Ubuntu clipboard is similar to the Windows one (I'd be stunned if it was significantly different, because users' requirements are the same on any platform)... I'm sure someone will find your suggestion useful.
–
Peter.ONov 7 '10 at 15:45

Screen is a multiple-terminal emulator not a clipboard manager.
–
Marco Ceppi♦Nov 7 '10 at 14:25

It seems that screen and tmux only work at the terminal level (I can't find any reference to "clipboard" in either of their info documentation)... What I'm looking for is a system-wide clipboard copy and paste utility... I probably should not have used terminal as a tag... The type of utility I want will be able to read/write via std-in/std-out or file-in/file-out, and handle Unicode/Rich-text/Picture/etc clipboard formats...
–
Peter.ONov 7 '10 at 14:30

I've just found a reference on stackoverflow... gpm is for a non-X terminal "clipboard", and GNU screen has its own "clipboard" also... I see now why you mentioned them... This is great info, and it has led me into a deeper understanding of what goes on behind the scenes... I'll stick to the basic Xterm "selections system" (clipboad) for now.. The Linux "clipboard" seems to be so different to Windows, that what I was looking for may be done in a very different way here.. +1 :)
–
Peter.ONov 9 '10 at 19:54