Copy’n’Paste from Xterm to Chrome

Problem: X11 has a classical copy/paste mechanism which is:
select text – press middle mouse button in the target field.
And there is a second copy/paste which was adopted from Mac and Windows which is:
select text – Ctrl-C – click into tagert field – Ctrl-V.

I prefer the classical approch, but in some web applications in Chrome paste with mouse does not work.  e.g. Google Docs Spreadsheet fields before hitting F2, or wordpress post content dialog in chrome. This is a known bug:

Due to this bug you cannot copy from xterm to some Chrome webapps, because xterm does not support Ctrl-C obviously.

Workaround: add the following line to ~/.Xresources:

XTerm*VT100.translations: #override <Btn1Up>: select-end(PRIMARY, CLIPBOARD, CUT_BUFFER0)

After the next login you can select text in an Xterm as usual, and paste with Ctrl-V in the browser.
If you don’t like to restart you X session you can reload your Xresources immediatly with:

xrdb .Xresources

This entry was posted in Linux and tagged , . Bookmark the permalink.