I am looking for 2 answers.
Where does ubuntu store its clipboard?
How to view the clipboard text in terminal other than simply pasting?
1 Answer
Unfortunately, I don't know the answer to the first question (If someone knows, please edit this answer!). I do know the answer to the second.
You will need to install a utility called xclip.
Install xclip
sudo apt-get update sudo apt-get install xclip To view the clipboard:
xclip -o -sel p or if nothing appears / error:
xclip -o -sel c What these options mean:
xclip: the program -o: Output to stdout (Standard Out, in this case, the terminal) -sel: Select clipboard -p: primary clipboard. Pretty much used for all copy/cut operations. (right-click, shortcut keys, etc.) -s: secondary clipboard. Pretty much not used anymore. :) -c: clipboard. Generally used for shortcut key copy/cut. Which one should I care about?
The primary one. :)