maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   Found something cool on Sailfish (qdbus) (https://talk.maemo.org/showthread.php?t=96459)

Feathers McGraw 2016-02-17 22:33

Found something cool on Sailfish (qdbus)
 
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:

http://i.imgur.com/doS9kE8.png

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.

kombipom 2016-03-20 09:23

Re: Found something cool on Sailfish (qdbus)
 
Thanks for this post, I'm trying to use rockpool so I need qdbus to talk to it.

Unfortunately I can't get the package to install.
Code:

pkcon install qt5-qttools-qdbus
just keeps telling me about unsigned packages, when I type 'y' it goes around in the same loop and no matter now many times I say 'y' it never installs anything.

I've tried to Google but found nothing. Any ideas?

coderus 2016-03-20 09:26

Re: Found something cool on Sailfish (qdbus)
 
devel-su? or post your error log.

kombipom 2016-03-20 09:42

Re: Found something cool on Sailfish (qdbus)
 
1 Attachment(s)
I've tried as normal user and under devel_su and get the same thing. Output of command attached.

coderus 2016-03-20 10:33

Re: Found something cool on Sailfish (qdbus)
 
so did you enabled installation from untrusted sources in settings?

kombipom 2016-03-20 23:10

Re: Found something cool on Sailfish (qdbus)
 
Yes, untrusted allowed. Developer Mode on. I don't have allow developer updates on as that needs a log in.

taixzo 2016-03-21 00:42

Re: Found something cool on Sailfish (qdbus)
 
Does this have new features that SailDBusViewer doesn't have?

coderus 2016-03-21 06:15

Re: Found something cool on Sailfish (qdbus)
 
no, this is just common cli tool


All times are GMT. The time now is 21:44.

vBulletin® Version 3.8.8