LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Read KDE clipboard content (https://www.linuxquestions.org/questions/linux-general-1/read-kde-clipboard-content-303106/)

neranjana 03-18-2005 05:36 AM

Read KDE clipboard content
 
Hi

Is there anyway that I could get the content of the clipboard (I use KDE) inside a shellscript? I want to copy the content of the clipboard to a file programatically.

Thanks

Neranjana

rgawenda 03-18-2005 06:25 AM

Try this

Code:

$dcop klipper klipper getClipboardContents

neranjana 03-20-2005 09:54 PM

Hey, this is great. I just managed to configure Festival (speach synthesizer) to read the contents of the clipboard. If any body is interested, the shell script is

dcop klipper klipper getClipboardContents > $HOME/festivaltext
festival --tts $HOME/festivaltext

I have Mandrake 10.0 and have festival, and festvox rpms installed.

I created an icon in the taskbar to call this shellscript. So now when I want to read text, all I need to do is select the text in any application, right click and copy to clipboard and then click the shortcut to the above shellscript and Festival will read it aloud. There maybe better and more efficient ways to do it but this is the best I could find.

Thanks

Neranjana

MikeyCarter 05-10-2005 12:12 PM

Read and Write Gnome Clipboard
 
Do you know how to read and write to the gnome clipboard through a shell script?


All times are GMT -5. The time now is 05:50 AM.