View Single Post
Feathers McGraw's Avatar
Posts: 654 | Thanked: 2,368 times | Joined on Jul 2014 @ UK
#1
Today I was exploring qt dbus methods on my desktop machine using Qt 5 D-Bus Viewer, and it got me wondering if something similar existed for Sailfish.

Searching with zypper found me a package called qt5-qttools-qdbus, which contains the commandline tool qdbus you can use to run dbus commands, and also qdbusviewer:



A little small, but it still works with a touch screen (would have been great with a resistive touchscreen...).

If you want to run these apps from the commandline without typing the full path, you can add this to your .bashrc file:

Code:
# change PATH to include the path of binaries provided by qt5-qttools-qdbus
# e.g. qdbus and qdbusviewer
PATH=$PATH:/usr/lib/qt5/bin/
and then load it:

Code:
source ~/.bashrc
Thought I'd share because it seems like a useful way to discover dbus methods on Sailfish and control apps from scripts - for example, on my desktop I was fiddling around to make Kontact load minimised, which used this command:

Code:
qdbus org.kde.kontact /kontact/MainWindow_1 hide
I'm sure there are similar useful things you could do with this on SFOS.
 

The Following 15 Users Say Thank You to Feathers McGraw For This Useful Post: