How does ExecDBus actually work?

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.

1 Like

The ExecDBus value is an optional command line which will be used to auto start the application to provide the . DBus service.

Please use the search funcition in this forum:
…and you can find enough more.

It is actually quite well (I think) described in the documentation: Launchers | Sailfish OS Documentation

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.

Now this works in combination with the DBusActivatable or X-DBusActivatable keys in the .desktop file. If that key is set to value true, lipstick knows that it can just call Open() or Activate() DBus methods, as described in Desktop Entry Specification.

Thanks, that was useful.

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…

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?”

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 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.

But i did make an effort first:


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.

Watch it! There are rules you know…

And no derailing the topic, please.

It would be helpful to also include a link to the rules here, or cite them properly.
But the first priority is:

It also says, among other things:

Please avoid topics and discussion that are too subjective or argumentative.

Yes, I apologize for reacting so emotionally here.

But there is still no justification for threatening me:

Watch it! There are rules you know…

Perhaps you will think about my criticism, which was considered constructive.

1 Like

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.

I would like a desktop launcher do things with a shell script as I’m used to doing on my Linux machines, and keep hitting hitherto unknown difficulties, and always the term DBus comes up.

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:

[Desktop Entry]

ExecDBus=harbour-seaprint --dbus

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.

1 Like


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:

gdbus call --session --dest net.attah.seaprint --object-path /net/attah/seaprint --method org.freedesktop.Application.Open "['/home/defaultuser/Documents/1.pdf']" {}
1 Like

Seems i’ll have to make a PR for nemo-qml-plugin-dbus next, as it does not appear to be able to deal with “a{sv}”.