Xfce Forum

Sub domains
 

You are not logged in.

#1 2021-01-22 21:08:02

Friedrich
Member
Registered: 2016-09-18
Posts: 134

Copy text to clipboard from shell script

Hi

how can i copy text to the xfce-clipboard that was created with a shell script? I know there are tools like xclip but they need there own command to paste it somewhere. To use the text in the system the best way would be to copy it to the xfce-clipboard (xfce4-clipman).

friedrich

Offline

#2 2021-01-23 00:00:58

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,029

Re: Copy text to clipboard from shell script

Pipe your shell script output to xclip and specify the clipboard as the destination. Example:

echo "test" | xclip -selection clipboard

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2021-01-23 07:18:36

Friedrich
Member
Registered: 2016-09-18
Posts: 134

Re: Copy text to clipboard from shell script

Thanks.

Offline

Board footer

Powered by FluxBB