Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

How to paste text in a xterm? Now I can copy text from xterm to an outside application, like Firefox, by highlighting the text there. But I can not copy text from firefox to xterm. I am just normal user of linux system and dont have root access to install patches. Is there any workaround?

System information is Linux version 2.6.18 (... @hs20-bc1-7. Build. Redhat. Com)

Edit: One important fact I forgot to mention is that I'm using RealVNC to connect to the Linux server. Right-click works fine for prompt in my local Linux, but not the remote instance.

share|improve this question

migrated from stackoverflow.com May 18 '11 at 20:19

This question came from our site for professional and enthusiast programmers.

    
You'll need to tell us what you tried, and what didn't work. What did you click and type, and in what order? It is not acceptable to just tell us "I can not copy". –  Aaron McDaid May 18 '11 at 19:42
    
text is copied from firefox using 'copy' button as in rightclick menu. to paste, in my xterm, there is no menu with copy/paste button, so cant do this with mouse. tried shortcut key crtl+v and crtl+shift+v... neither not working.... –  Richard May 18 '11 at 19:52

4 Answers 4

up vote 6 down vote accepted

As noted by yasouser, middle-click is the standard way to paste the selection buffer in linux. This buffer gets written every time anything is selected with no need to initiate a copy command. In gtk based or influenced apps, there is usually a keybinding for this as well. Shift+Insert

In most Desktop Environments there is also a copy buffer that is separate from the selection buffer. Getting items into this usully requires a keyboard shortcut like Ctrl+C or menu selection, and pastes with Ctrl+V or a menu. These bindings are program specific and may varry, although they usually follow toolkit standards.

On KDE there is often a clipboard buffer configured by default in the tray that handles access to several recent clipboard items. This sort of function can be added to gnome and other environments as well.

share|improve this answer

To paste text copied from other windows (like you said firefox) in xterm window click the mouse wheel or center mouse button.

share|improve this answer

Keep in mind that when you're pasting into your Xterm that if you're at the command prompt you could flood it with alot of 'junk'. You'll want to do something like this:

$ cat - >tmp.txt

This instructs the 'catenate' program to direct all of it's input into 'tmp.txt'. You'll paste your data in there and then enter ctrl-d which sends an 'end-of-file' to the cat program telling it to close its input. You'll get the command prompt back, and tmp.txt will contain what you pasted in.

Some window managers are 'rude' and start eating your clicks, but alot of the newer termals(gnome-terminal etc) have the standard 'Edit' menu.

share|improve this answer

You could try an X11 program like xcb to view what you have just selected. Unfortunately, things like Firefox and Chromium don't seem to follow whatever convention xcb uses, so it's not a complete solution.

share|improve this answer

Your Answer

 
discard

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.