Send copy from command line

Asked by André Desgualdo Pereira

Is it possible to send some text to Diodon from command line?

Example, with Parcellite we can do:

$ parcellite "some text to copy to clipboard"

or

$ echo "some text to copy to clipboard" | parcellite

Question information

Language:
English Edit question
Status:
Solved
For:
Diodon Edit question
Assignee:
No assignee Edit question
Solved by:
Dariel Dato-on
Solved:
Last query:
Last reply:
Revision history for this message
Best Dariel Dato-on (odd-rationale) said :
#1

At the moment, it is not possible to enter text into the clipboard from the command line. It could be a feature that might be considered.

Revision history for this message
André Desgualdo Pereira (desgua) said :
#2

Thanks Dariel Dato-on, that solved my question.

Revision history for this message
Oliver Sauder (sao) said :
#3

The two tools xlcip and xsel provide this functionality already and Diodon works alongside them.

You can install it with the following command:
sudo apt-get install xclip xsel

After installation have a look at http://linuxtidbits.wordpress.com/2008/02/22/command-line-to-clipboard/ for some examples.

When I was testing it though it seemed that "Use primary selection" needs to be enabled in Diodon to work. Hope this helps.

Revision history for this message
André Desgualdo Pereira (desgua) said :
#4

Great! Thanks.