X11 Clipboard – Copy File to xclip and Paste to Firefox

clipboardcopy/pastex11

I'm coping file to xclip

cat file.txt | xclip

I'm pasting without problem with

xclip -o

When I want to paste it to Firefox with Ctrl+V it pastes old text (that shouldn't already be in the clipboard).

When I go back to terminal and run xclip -o it pastes the correct text.

Why is there a problem with pasting to Firefox?

Best Answer

X11 has several available clipboards. By default, xclip places data in the primary selection buffer. To paste it, you use middle-click.

If you want to use Ctrl+v, use xclip -selection clipboard. See man xclip for more information.

There is good information about the different clipboards on freedesktop.org.

Related Question