Is there a keyboard shortcut in Firefox to paste the Unix "primary selection" clipboard, not the Firefox one?

11

3

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

This seems to work in every application 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?

Note: I'm looking for a keyboard shortcut, not a mouse action.

mike

Posted 2010-05-13T23:29:15.067

Reputation: 360

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 – 2014-10-11T09:04:30.103

there is a similar question in the unix board, did you try the proposed solutions? http://unix.stackexchange.com/questions/11889/pasting-x-selection-not-clipboard-contents-with-keyboard

– weberik – 2014-11-10T16:37:55.510

Answers

1

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.

Florian Diesch

Posted 2010-05-13T23:29:15.067

Reputation: 3 380

"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 – 2014-10-11T09:06:55.323

middle mouse button. that's what I use. (click the wheel) – Jasen – 2014-12-09T10:43:54.177

3If you're in an xterm, for example, the primary selection is your only option. – user2898 – 2010-05-14T20:41:40.577

1

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

artistoex

Posted 2010-05-13T23:29:15.067

Reputation: 3 353

0

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.

jwaddell

Posted 2010-05-13T23:29:15.067

Reputation: 2 626

try Shift + Insert – spinus – 2014-11-29T01:11:48.233

3Is there a way to do it without taking your hands off the keyboard? – user2898 – 2010-05-14T20:40:55.710

@spinus I think the whole point is that shift+insert does not work with firefox. – iago-lito – 2018-09-16T08:42:46.137

0

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.

T. Perkins

Posted 2010-05-13T23:29:15.067

Reputation: 1

But then you'll lose the distinction between those clipboards. I tend to use the mouse selection for more temporary stuff. Given that, clipit (https://sourceforge.net/projects/gtkclipit/) is a nice clipboard manager, which would provide this feature, too.

– blueyed – 2015-03-29T17:58:34.777