Now that this functionality is allowed in store… how do we actually make use of it?
What will even invoke it?
I thought this was a building block for enabling open-with while preserving single-instance apps.
How wrong am i?
From what little i could find on the topic, i see i will get a special invocation of my choosing of my app and have it do whatever with that. That doesn’t sound particularly helpful for either open-with or single-instancing. I hope i’m missing something.
I see sailfish-office calls “openFile”… but it looks a lot like it is in the instance of itself that was just started.
So, the ExecDBus should just contain some magical parameter which tells your application to not actually show a window, but just stay on the background, waiting for commands via DBus.
One follow-up: pure qml apps, launched through sailfish-qml have no way to lay dormant and wait for dbus-activation, correct? Or is there maybe a magic switch to sailfish-qml that can do that? Or a hack in QML to run and e.g. Initialize a DBusAdaptor , but not show() the ApplicationWindow?
I have to admit that i still don’t quite get it.
I have seen and read both those articles; but the problem is that they assume the reader already knows what it is meant to achieve.
And even if i think i have an idea now, it would be very nice to have validated and any partial misconceptions taken out before sinking hours into it.
Calling it ExecDBus is really really misleading, since it sounds like it would be executed by/upon a DBus call… but i gather it is the exact opposite.
I’ll do some more tinkering…
@chris_bavaria
I have searched, and found that thread.
But this is not the same question, and it is not very polite to barge in to a thread with “this thing you mentioned, what does it do?”
@attah
Self-initiative on a topic enriches a community and keeps it alive. I have already read some of your posts and always read a lot of text without constructive solutions.
I think that this forum has changed into an information platform.
Please use the old forum https://together.jolla.com/questions/ as a template and ask yourself whether your contribution is of real benefit to others.
Why are you bothering other people with how ExecDBus works? If you had researched beforehand or tried it with an example, your question would have been different.
I don’t know of a canonical definition of that expression, and i don’t quite see if you mean that is good or bad. But it sounds like maybe you think that is bad.
But here you are saying the pure Q&A format is good? This is a Q; feel free to A, or just pass by.
And just previously you thought i should insert my question into another… i don’t get it.
I also know very little about DBus and often have the same problem with SFOS documentation: it assumes one already knows about the topic at hand, it’s clearly not for beginners.
I don’t criticize this though, just stating the facts.
Yes, I need to learn about it, but there’s also nothing wrong with asking questions; maybe one magic incantation is all I need without having to get deeper into the topic (but atm it doesn’t look like it; RTFM it is).
It it sounds like it would be executed by/upon a DBus call, that’s probably because that’s exactly what it does! Say you have something like this in your .desktop file:
Now, when you send a message via D-Bus to net.attah.seaprint, it will execute harbour-seaprint --dbus. You can test this with dbus-send like this: dbus-send --session --dest=net.attah.seaprint /net/attah/seaprint/Test net.attah.seaprint.Test string:foo
Now, it’s up to your app to actually do something with the message.
I must confess; i did actually get somewhere in the meantime.
Good point about **X-**DBusActivatable, since otherwise desktop-file-install will not let you build.
(Or just install it like a normal file, like sailfish-office…)
Now i just have to figure out why sometimes the app refuses to launch with this addition.
(But now that i re-test i also cannot reproduce).
And another hint to future readers…
dbus-send will not cut it for the official freedesktop methods that want an object, so you need gdbus instead: