Cannot call klipper methods in dbus with python

こ雲淡風輕ζ 提交于 2019-12-05 21:38:54

After some try, I found the the mistake: >>> proxy = bus.get_object("org.kde.klipper","/org/kde/klipper") must be: >>> proxy = bus.get_object("org.kde.klipper","/klipper") this solved the problem

Looks quite scarry. It might be simpler to call qdbus through bash:

import os
system("qdbus org.kde.klipper /klipper getClipboardHistoryItem 0")

0 is for current selection, 1 is for following one - and so on.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!