-   Linux - Software (
-   -   Copy/Paste in xterm (

wampfler 12-30-2003 10:24 AM

Copy/Paste in xterm
I hope you can help me:
How can i copy text from xterm to mozilla or the other way? i use window maker, not kde or gnome. Or isn't this possible in Linux?

jailbait 12-30-2003 10:45 AM

"How can i copy text from xterm to mozilla or the other way?"

I think that you use drag and drop instead of cut and paste. I too always have trouble making it work.

Be prepared. Create a LifeBoat CD.

Steve Stites

wampfler 12-30-2003 10:58 AM

drag & drop between xterm and mozilla? no way here!

Jose Muņiz 12-30-2003 01:43 PM

Select your text in Mozilla, then go to xterm and press the middle button of your mouse. That should do the trick :)

jailbait 12-30-2003 02:50 PM

"Select your text in Mozilla, then go to xterm and press the middle button of your mouse. "


Be prepared. Create a LifeBoat CD.

Steve Stites

wampfler 12-30-2003 04:35 PM

thx for help. i thought it should work with ctrl-c and ctrl-v or another key combination

zzypty 03-29-2009 08:50 AM

This reply might be extremely late and not benefit the person who started this thread. But, just in case there are any other people who stumble upon this thread, here is a detailed explanation.

Copying from xterm to another application :

When you highlight something in xterm, it gets copied to your primary buffer. The only way to paste something from your primary buffer is to click your scroll (on your scroll mouse) or click your left and right keys of your mouse simultaneously.

ctrl-v pastes from your clipboard. xterm does not recognise the clipboard and nor does it recognise the keys ctrl-v. Hence, the conventional copy-paste method does not work.

I would recommend you try the following -
(a) Open xterm and select (highlight) the text you want to copy
(b) Go to the application where you want to paste the text. Hover your mouse above the place where you want to paste.
(c) Click your scroll button on your mouse.

One should be very careful about the primary buffer. Being very volatile, any higlighting will erase the buffer of its previous contents. For instance, an alt-d (in firefox) will replace the contents of your primary buffer with the url of your opened tab.

Copying from another application to xterm :

Most other applications, the process of copying to the clipboard results in copying to the primary buffer as well. For instance, when we wish to copy (for instance) the url opened in a certain tab, we do the following -
(a) Open the tab and highlight the url (a ctrl-a or alt-d, etc)
(b) Click ctrl-c to copy the string
Here, in step (a), we write to the primary buffer and in step (b), we write to the clipboard.

Thus, when we wish to copy some text and paste it in xterm, all we need to do is select the text (highlight it) and move your cursor to xterm and click the scroll button.
(Note : We don't need to do a ctrl-c!)

If you wish to fiddle around a little more with your xterm keybindings, etc., this article might help you -
It certainly helped me a lot!

unSpawn 03-29-2009 09:18 AM

Posting is appreciated, it's valuable information, but please don't post in threads older than say 4 to 6 months. It would be better to create your own thread then point to the original one. BTW, ever heard of 'autocutsel' (clipboard buffers synchronization tool)?

Mark-32 10-24-2014 03:47 AM

it is supported already. no hack needed.
<Control> + <Insert> key combination will paste into xterm

Lunar 04-04-2015 04:15 PM

xterm paste
Ctrl+C will not work in any terminal as it's used to break, interrupt

i've tried everything. Shift+Ins works for me on opensuse.


DJ Shaji 04-05-2015 04:06 PM

Middle mouse button (mostly the scroll thingy can be pressed as a mouse button, or try pushing left and right buttons together) pastes text on X. Works on any DE (obviously)

rtmistler 04-06-2015 08:34 AM

VERY old thread people. The OP long ago probably solved this or moved on.

See the moderator's recommendation from many years ago for a suggestion.

nodestorm 04-28-2015 04:50 PM

This thread is the first result when searching for "copy from xterm" and zzypty's and the subsequent answers were extremely useful even they were years late.

Putting the correct information into the first result should be encouraged.

pgan 05-23-2020 10:05 PM

For Ubuntu 18.04
Highlight text from other application (copies text to primary buffer)

Shift + Insert worked as alternative to middle-mouse-click to paste into xterm

All times are GMT -5. The time now is 02:37 PM.