Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I run Linux, and am used to selecting text with the mouse to copy and pressing shift-Ins to paste. (This uses an alternate clipboard known as the "Primary Selection".)

This seems to work in every app besides Firefox. Firefox uses a different clipboard, where Ctrl-C copies and Ctrl-V pastes. Is there a keystroke or configuration change I can do to make Firefox paste from the Unix "primary selection" clipboard -- the one it pastes from when I click the middle mouse button?

Edit: I'm looking for a keyboard shortcut. Not mouse.

share|improve this question
    
The usual keyboard shortcut to paste the PRIMARY selection is shift+insert. The problem in Firefox may be related to how GTK+ decided to associate shift+insert with the CLIPBOARD selection. GNOME bug 643391 has patches to allow shift+insert to be remapped to paste from the PRIMARY selection. I did not try these patches yet, but I'll give them a try at some point, as this now tends to break my interaction with all GTK+-based applications... –  njsg Oct 11 at 9:04

4 Answers 4

In Linux, clicking the middle button (or scroll wheel) on the mouse should paste the contents of the Unix clipboard.

If you don't have a middle button on your mouse, clicking both the left and right buttons at the same time is often set up to emulate a middle-click.

share|improve this answer
3  
Is there a way to do it without taking your hands off the keyboard? –  user2898 May 14 '10 at 20:40

X11 has multiple clipboards: Selecting text with the mouse fills the "Primary Selection" and clicking the middle button inserts it. For Ctrl-V/Ctrl-C most programs use the "Clipboard", Shift-Ins seems to sometimes use the Primary Selection, sometimes the Clipboard.

So it's easier to not use Shift-Ins but either the Mouse or Ctrl-V/Ctrl-C to copy text between different applications.

share|improve this answer
2  
If you're in an xterm, for example, the primary selection is your only option. –  user2898 May 14 '10 at 20:41
    
"It's easier" is quite relative to the tools you normally use. Depending on the tools you use, it may be easier to not use Ctrl-V/Ctrl-C. –  njsg Oct 11 at 9:06

You can bind the following command to a key, it should make your firefox selection available to other programs:

xsel -b|xsel

and vice versa

xsel|xsel -b
share|improve this answer

The autocutsel util helped me...

I run this in my X startup script (~/.Xclients):

autocutsel -buttonup -fork

You can test it first in a terminal like so:

autocutsel -verbose

This util syncs CLIPBOARD with CUT_BUFFER0 (and vis-a-versa), so that a selection in rxvt (my "xterm" of choice) will paste in Firefox using its standard hotkeys.

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.