On 2026-09-29, Franco Martelli <[email protected]> wrote: > Hello, > > I'd like to write the content of a .txt file to the X11+KDE clipboard, > in order to do that I defined an "alias": > > ~$ alias toclip="qdbus6 org.kde.klipper /klipper > org.kde.klipper.klipper.setClipboardContents" > > ~$ cat b.txt > someText > > The following command return error: > > ~$ cat b.txt | toclip > Error: org.freedesktop.DBus.Error.UnknownMethod > No such method 'setClipboardContents' in interface > 'org.kde.klipper.klipper' at object path '/klipper' (signature '') > > The following command works: > > ~$ toclip "$(cat b.txt)" > > Is there a way to rearrange the "toclip" alias in order that it works > using a pipe? Thus: > > ~$ cat b.txt | toclip
> Please don't tell me to use "xclipboard" or "xset" I just want to use > the DBus channel. I think you've been told to use xclip in spite of your warning. In the contrary case, you'll have to create bash function rather an alias. > Thank in advance, kind regards

