2

Trying to copy to clipboard from command line by using command:

xclip /etc/apt/sources.list

Trying to get out from clipboard:

xclip -o

This prints the content of sources.list and it is fine.

But now I try to paste into eclipse project and got some old clipboard content. Looks like xclip uses its internal clipboard.

How to copy into system clipboard from command line?

Zanna
  • 70,465
vico
  • 4,527
  • 21
  • 58
  • 87

1 Answers1

6

You need to specify the clipboard, instead of the default primary X selection:

xclip -o -selection clipboard

Or, if you use xsel instead, another tool with the same functionality, you just need the short option -b:

xsel -ob
Byte Commander
  • 107,489