[Techtalk] How to copy/paste text from gnome terminal to Netscape?

Akkana akkana at shallowsky.com
Tue Oct 2 13:37:58 EST 2001

the sunlover2 writes:
> Anyone know how to copy/paste text from gnome terminal to web browser and 
> vim, gedit, etc. under Linux?
> I can only copy/paste from browser/vim/gedit to gnome terminal.

Copy/Paste are a little different on Unix than they are on Windows
and Mac.  On Unix (including Linux), selecting something automatically
copies it -- there's no need to go to a menu item or a key binding
like ctrl-C.  Once you've selected something, clicking the middle
mouse button pastes it into the window the mouse is in (if it's a
windowed application, it pastes at the mouse position, otherwise it
pastes wherever the text insertion caret was at the time).
If you use this mechanism (called in X the "primary selection")
all the time, it'll work just about anywhere.

(If you don't have a middle mouse button, clicking the left and
right buttons at the same time usually emulates middle mouse in Linux.)

On top of this, there's a secondary mechanism (to X programmers
it's called the "clipboard selection") which some apps support when you
select "Copy" or "Paste" from the menus or key bindings.  There's no
standard on how this works -- some apps treat the primary and clipboard
selections similarly, others keep them separate, and still others (like
terminal clients) don't handle clipboard selection at all.  So if
you use this mechanism, it'll be confusing sometimes and you'll
have to remember which apps support it and which don't.  That's
why I recommend using the primary selection method instead.

One other thing, since you mentioned pasting into web browsers:
Netscape and Mozilla (not sure about konqueror or opera) will go to a
url if you "paste" it (with the middle mouse) into the content area.
So if you have a URL showing in your terminal window or mail
program (and you haven't set things up so that clicking on it calls
up a browser window automatically), you can select it with the mouse,
move to a browser window and click the middle mouse to load that url.
It's a lot faster than erasing whatever's in the urlbar, selecting
something, pasting into the url bar and hitting return.


More information about the Techtalk mailing list