maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   How to make a launcher for a shell script (https://talk.maemo.org/showthread.php?t=101329)

nieldk 2022-05-14 07:59

Re: How to make a launcher for a shell script
 
1 Attachment(s)
Did a quick compile
Extract this (tar xvf.shc.tar.gz)
copy the shc to /usr/local/bin/

nonsuch 2022-05-14 20:19

Re: How to make a launcher for a shell script
 
Quote:

Originally Posted by nieldk (Post 1574111)
You could use shc to compile the script to binary.
I cant recall if thats available on SailfishOS, but otherwise, its fairly simple.
Sources for shc is available so if its not already in repositories, it Can be compiled and used.
https://github.com/neurobin/shc

shc works.
But the compiled script suffers exactly the same ailments as the script itself, i.e. the launcher (lipstick I guess?) doesn't know that the script started, or that it finished, and just keeps spinning a waiting spinner for some time. It is not harmful, just not nice to look at.
I was wondering if it was possible to send the appropriate commands to the launcher (dbus???) via shell commands, or if I had to create a Silica wrapper around the script to get it to behave "nicely".

That said, is it possible to create a sort of Hello World Silica/QML program without having to install the complete SDK (on my desktop)?

nieldk 2022-05-15 13:30

Re: How to make a launcher for a shell script
 
Quote:

Originally Posted by nonsuch (Post 1574114)
shc works.
But the compiled script suffers exactly the same ailments as the script itself, i.e. the launcher (lipstick I guess?) doesn't know that the script started, or that it finished, and just keeps spinning a waiting spinner for some time. It is not harmful, just not nice to look at.
I was wondering if it was possible to send the appropriate commands to the launcher (dbus???) via shell commands, or if I had to create a Silica wrapper around the script to get it to behave "nicely".

That said, is it possible to create a sort of Hello World Silica/QML program without having to install the complete SDK (on my desktop)?

Really don’t know about dbus, but the API docs are here.
Coderus might know, but not sure how active he is here atm.

https://docs.sailfishos.org/Referenc...Is/D-Bus_APIs/

mrsellout 2022-05-15 18:46

Re: How to make a launcher for a shell script
 
What is the purpose of the mount?
Is it for a backup or just to access files eg. (music)?

Perhaps there could be another way of doing this.

The Situations app could be used to trigger a mount when you connect to a WIFI network during a specific time frame (and unmount when you disconnect).

nonsuch 2022-05-17 17:19

Re: How to make a launcher for a shell script
 
^ Nah, I want it on-demand, clickable.
Anyhow, my question is not so much about this application specifically, but rather generally about how I can launch a shell script through the launcher (lipstick?) without getting this pointless cover with a spinner.

nonsuch 2022-05-17 17:21

Re: How to make a launcher for a shell script
 
Quote:

Originally Posted by nieldk (Post 1574117)
Really don’t know about dbus, but the API docs are here.
Coderus might know, but not sure how active he is here atm.

https://docs.sailfishos.org/Referenc...Is/D-Bus_APIs/

Thanks anyhow.
Looks like the only command for lipstick is to trigger a screenshot...


All times are GMT. The time now is 02:39.

vBulletin® Version 3.8.8