I would like to use the command line to put text in the GUI clipboard so that it can, for example, be pasted into a graphical web browser's text input field. I am using Kubuntu 20.04.
I tried as an example uptime | xclip
, and when I press the middle mouse button, the uptime output is pasted. However, when I press Ctrl-Shift-V on the command line, or Ctrl-V in a GUI application, the uptime text is not pasted; instead, the previously copied text is pasted.
I read that there is a distinction between the selection and the clipboard. I presume xclip
is copying into the selection. How can I copy into the clipboard?
xsel
makes the answer more complete for me. – Keith Bennett Feb 11 '21 at 06:23