I am trying to copy from the terminal with xclip and paste it into the unity desktop environment into gedit text editor. I can copy and paste with xclip in terminal:
$ cat line-size.c | xclip
xclip -o > input5.txt
cat input5.txt
#include <stdio.h>
...
However, when I press control + v to paste into gedit, it only pastes the actual last thing I copied within unity desktop, such as something from firefox browser.
How can I paste in gui applications something I copied from terminal?
xclip < line-size.c -selection clipboard– JamesTheAwesomeDude Jun 18 '15 at 21:23cat line-size.c | xclip -sel cliphas the same result thatcat line-size.c | xclip -selection clipboard– Geison Santos Jun 06 '16 at 13:58xclipwas to interact with something besides the user's clipboard. – aaaaaa Jan 22 '18 at 23:27options are "primary" to use XA_PRIMARY (default), "secondary" for XA_SECONDARY or "clip‐board" for XA_CLIPBOARD– DanCat Aug 05 '23 at 21:28