We have moved to a new Sailfish OS Forum. Please start new discussions there.
5

Running app from shell [answered]

asked 2014-12-14 11:11:40 +0300

NeWin gravatar image

hello, I am currently trying to design an app to raise the compatibility between SailfishOS and linux better. Something that can feel like (or better than) the compatibility between IOS and OSX (since IOS8 and yosemite).

But I don't (or hardly) find any documentation of how things like "Quick Launcher" or this trick https://together.jolla.com/question/17992/sending-an-sms-via-the-command-line/ could work.

So I just want to understand how to run a sailfish native app from the command line for a future usage of execve execlp or even system in my app

By the way if my approach is wrong and there is a easier way to do what I want It can be really helpful too

edit retag flag offensive reopen delete

The question has been closed for the following reason "the question is answered, an answer was accepted" by eric
close date 2014-12-15 10:18:31.268977

1 Answer

Sort by » oldest newest most voted
7

answered 2014-12-14 15:37:17 +0300

coderus gravatar image

you should prefer to use xdg-open /usr/share/applications/some-application.desktop to start applications properly. if designing UI you can use Qt.openUrlExternally("/usr/share/applications/some-application.desktop") in QML and QDesktopServices::openUrl("/usr/share/applications/some-application.desktop") in Qt.

edit flag offensive delete publish link more

Comments

Thank you ! this is exactly the answer I was waiting for ! Last little thing: xdg-open seems act like if I add a "&" in my shell, do the QT.openUrlExternally work the same way ? (by this question understand "do I have to fork before or something like this?")

NeWin ( 2014-12-14 17:23:56 +0300 )edit

it's like you executing by clicking executable file. :)

coderus ( 2014-12-14 17:26:30 +0300 )edit

Question tools

Follow
3 followers

Stats

Asked: 2014-12-14 11:11:40 +0300

Seen: 1,540 times

Last updated: Dec 14 '14