On Thu, Mar 05, 2009 at 11:43:58PM -0800, patrick keshishian wrote:
> cut-and-paste no. copy-and-paste yes. is that not good enough?

The main problem is that there are are 3 different copy-and-paste
operations under X Windows.  There is the PRIMARY (copies by
highlighting text and pastes by clicking the middle mouse button), the
SECONDARY, and the CLIPBOARD (copies by pressing Ctrl-C and pastes by
pressing Ctrl-V).

Most modern applications (like firefox, openoffice, etc.) can use both
the PRIMARY and CLIPBOARD.  The problem is that xterm can only use the
PRIMARY.  So, if you've copied something to the CLIPBOARD in firefox,
then you won't be able to paste it in xterm.

I solve this problem by using xsel

 http://openports.se/x11/xsel

Using my window manager, I've bound Mod4-C (Mod4 is the Windows keys on
most computers) to the command

 xsel | xsel -b

and I've bound Mod4-V to the command

 xsel -b | xsel

The effect is that Mod4-C copies the PRIMARY to the CLIPBOARD, and
Mod4-V copies the CLIPBOARD to the PRIMARY.  Therefore, I can paste from
firefox to xterm by pressing Mod4-V, then clicking the middle mouse
button.

Reply via email to