[SailfishDevel] Lipstick and xdg-open

r0kk3rz r0kk3rz at gmail.com
Fri Oct 23 08:40:18 UTC 2015


Thanks Guys,

https://git.merproject.org/mer-core/libcontentaction/blob/master/src/doc.h

This seems to have some information about how it all hooks together, and I
can see that the sailfish-browser defines a separate .desktop file with a
systemd/dbus service to handle its 'open url' action.

https://github.com/sailfishos/sailfish-browser/blob/master/open-url.desktop

I think for my purposes it's simpler to disable the single-instance-app
directive and handle it internally myself, even though launching a new
process just to send a dbus method to the existing process seems to be a
bit of a convoluted way of doing it.

Regards,
Lewis Rockliffe

On Fri, Oct 23, 2015 at 6:28 AM, Tone Kastlunger <users.giulietta at gmail.com>
wrote:

> It depends if your app is configured (via .desktop file) to be running as
> single instance or not;
> and that is related to the launcher  (which is enforced on SFOS btw);
> see "How can I disable single-instance launching?" under
> <https://harbour.jolla.com/faq#4.5.0>https://harbour.jolla.com/faq).
>
>
> If the application is already open, lipstick will just raise the
> previously opened window.
> It is a good question about what the app does with the arguments...
>
> Best,
> tortoisedoc
>
>
> On Fri, Oct 23, 2015 at 12:09 AM, r0kk3rz <r0kk3rz at gmail.com> wrote:
>
>> Hi Developers,
>>
>> How does Lipstick handle xdg-open in cases when the app is already
>> running?
>>
>> When the app isn't running, I can currently open a file through xdg-open,
>> which opens the app and passes in the file url as a command line parameter.
>>
>> I expected that upon subsequent xdg-open calls, it would also call the
>> program with command line parameter, which I could use to check for an open
>> instance on dbus, fire off a method call, and close again. Sounds easy, but
>> this doesn't seem to be the case.
>>
>> If the app is already open, it comes into focus, and presumably needs
>> some kind of an interface to get the open args?
>>
>>
>> Watching dbus-monitor, i can see the following happen as i am trying to
>> open a file
>>
>> method call sender=:1.394 -> dest=org.freedesktop.DBus serial=1
>> path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=Hello
>> signal sender=:1.394 -> dest=(null destination) serial=2
>> path=/org/gtk/gio/DesktopAppInfo; interface=org.gtk.gio.DesktopAppInfo;
>> member=Launched
>>
>> which has a parameter with my file url that i'm trying to open. And then
>> lipstick brings my app into focus with this straight after
>>
>> method call sender=:1.390 -> dest=org.nemomobile.lipstick serial=3
>> path=/WindowModel; interface=local.Lipstick.WindowModel;
>> member=launchProcess
>>    string "/usr/bin/harbour-sirensong"
>>
>> Any information about how this is supposed to work?
>>
>> Regards,
>>
>> Lewis Rockliffe
>>
>> _______________________________________________
>> SailfishOS.org Devel mailing list
>> To unsubscribe, please send a mail to
>> devel-unsubscribe at lists.sailfishos.org
>>
>
>
> _______________________________________________
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to
> devel-unsubscribe at lists.sailfishos.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20151023/2e481734/attachment.html>


More information about the Devel mailing list